Skip to content

Commit d8d42f4

Browse files
authored
Merge branch 'master' into chore()-update-roadmap-4-nov-25
2 parents 58f8b37 + d3b547b commit d8d42f4

File tree

15 files changed

+128
-60
lines changed

15 files changed

+128
-60
lines changed

projects/igniteui-angular/src/lib/core/styles/components/combo/_combo-theme.scss

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,24 @@
210210
color: var-get($theme, 'clear-button-foreground-focus');
211211
background: var-get($theme, 'clear-button-background-focus');
212212
}
213+
214+
&%form-group-bundle--border {
215+
%igx-combo__toggle-button {
216+
background: var-get($theme, 'toggle-button-background-focus--border');
217+
}
218+
}
213219
}
214220

215221
@if $variant == 'indigo' {
216222
%form-group-bundle:not(%form-group-bundle--disabled):hover {
217223
%igx-combo__toggle-button {
218224
color: var-get($theme, 'toggle-button-foreground-focus');
225+
background: var-get($theme, 'toggle-button-background-focus');
226+
}
227+
228+
%igx-combo__clear-button {
229+
color: var-get($theme, 'clear-button-foreground-focus');
230+
background: var-get($theme, 'clear-button-background-focus');
219231
}
220232
}
221233
}
@@ -224,6 +236,14 @@
224236
%igx-combo__toggle-button {
225237
color: var-get($theme, 'toggle-button-foreground-filled');
226238
}
239+
240+
@if $variant == 'material' {
241+
&.igx-input-group--focused {
242+
%igx-combo__toggle-button {
243+
color: var-get($theme, 'toggle-button-foreground-filled');
244+
}
245+
}
246+
}
227247
}
228248

229249
.igx-input-group--focused {
@@ -254,14 +274,6 @@
254274
}
255275
}
256276

257-
//.igx-input-group:not(.igx-input-group--box) {
258-
// %igx-combo__toggle-button:focus {
259-
// @if $variant == 'material' {
260-
// background: var-get($theme, 'toggle-button-background-focus--border');
261-
// }
262-
// }
263-
//}
264-
265277
.igx-input-group--disabled {
266278
%igx-combo__toggle-button {
267279
background: var-get($theme, 'toggle-button-background-disabled') !important;
@@ -274,12 +286,4 @@
274286
}
275287
}
276288
}
277-
278-
%form-group-bundle {
279-
&:hover {
280-
%igx-combo__clear-button {
281-
color: inherit;
282-
}
283-
}
284-
}
285289
}

projects/igniteui-angular/src/lib/core/styles/components/list/_list-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@
229229
display: none;
230230
}
231231

232-
> * {
232+
> *,
233+
[class^='igx'] {
233234
--component-size: #{if($variant == 'indigo', 2, var(--list-size))};
234235
}
235236

projects/igniteui-angular/src/lib/core/styles/components/navbar/_navbar-theme.scss

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
igx-input-group {
3939
--ig-size: 1;
4040
}
41+
42+
.igx-icon-button,
43+
igc-icon-button {
44+
--ig-size: 2;
45+
}
4146
}
4247

4348
@if $variant == 'bootstrap' {
@@ -114,30 +119,27 @@
114119

115120
igx-icon,
116121
igc-icon {
117-
--component-size: 3;
122+
--component-size: #{if($variant == 'indigo', 2, 3)};
118123

119124
cursor: pointer;
120125
user-select: none;
121126
transition: color .15s $out-quad;
127+
128+
@if $variant == 'indigo' {
129+
width: auto;
130+
height: auto;
131+
padding: rem(6px);
132+
}
122133
}
123134

124-
>igx-icon,
125-
>igc-icon {
135+
> igx-icon,
136+
> igc-icon {
126137
color: var-get($theme, 'idle-icon-color');
127138

128139
&:hover {
129140
color: var-get($theme, 'hover-icon-color');
130141
}
131142
}
132-
133-
@if $variant == 'indigo' {
134-
igx-icon,
135-
igc-icon {
136-
--component-size: 2;
137-
138-
margin-inline: rem(6px);
139-
}
140-
}
141143
}
142144

143145
igx-navbar-action,

projects/igniteui-angular/src/lib/core/styles/components/select/_select-theme.scss

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

5656
.igx-input-group.igx-input-group--disabled.igx-input-group--filled,
5757
.igx-input-group.igx-input-group--disabled {
58-
%igx-select__toggle-button {
58+
%form-group-bundle %igx-select__toggle-button {
5959
background: var-get($theme, 'toggle-button-background-disabled');
6060
color: var-get($theme, 'toggle-button-foreground-disabled');
6161
}

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,6 @@
2323
'indigo': rem(16px),
2424
), $variant);
2525

26-
.igx-input-group {
27-
display: flex;
28-
flex-direction: column;
29-
30-
@if $variant == 'indigo' or $variant == 'bootstrap' {
31-
[igxLabel] {
32-
margin-block-end: rem(4px);
33-
}
34-
} @else if $variant == 'fluent' {
35-
[igxLabel] {
36-
margin-block-end: rem(5px);
37-
}
38-
}
39-
}
40-
4126
%time-picker-display {
4227
@include sizable();
4328

projects/igniteui-angular/src/lib/core/styles/components/tooltip/_tooltip-theme.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
gap: rem(8px);
2424
min-height: rem(24px);
2525
min-width: rem(24px);
26-
max-width: 200px;
26+
max-width: rem(200px);
2727
width: fit-content;
2828

2929
igx-icon {
@@ -34,6 +34,10 @@
3434
display: flex;
3535
cursor: default;
3636
}
37+
38+
&:not([data-default]) {
39+
max-width: initial;
40+
}
3741
}
3842

3943
%arrow--top {

projects/igniteui-angular/src/lib/directives/toggle/toggle.directive.ts

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ import {
33
Directive,
44
ElementRef,
55
EventEmitter,
6-
HostBinding,
76
HostListener,
87
Inject,
98
Input,
109
OnDestroy,
1110
OnInit,
1211
Optional,
13-
Output
12+
Output,
1413
} from '@angular/core';
1514
import { AbsoluteScrollStrategy } from '../../services/overlay/scroll/absolute-scroll-strategy';
1615
import { CancelableBrowserEventArgs, IBaseEventArgs, PlatformUtil } from '../../core/utils';
@@ -34,7 +33,13 @@ export interface ToggleViewCancelableEventArgs extends ToggleViewEventArgs, Canc
3433
@Directive({
3534
exportAs: 'toggle',
3635
selector: '[igxToggle]',
37-
standalone: true
36+
standalone: true,
37+
host: {
38+
'[class.igx-toggle--hidden]': 'hiddenClass',
39+
'[attr.aria-hidden]': 'hiddenClass',
40+
'[class.igx-toggle--hidden-webkit]': 'hiddenWebkitClass',
41+
'[class.igx-toggle]': 'defaultClass'
42+
}
3843
})
3944
export class IgxToggleDirective implements IToggleView, OnInit, OnDestroy {
4045
/**
@@ -159,13 +164,13 @@ export class IgxToggleDirective implements IToggleView, OnInit, OnDestroy {
159164
/**
160165
* @hidden
161166
*/
162-
@HostBinding('class.igx-toggle--hidden')
163-
@HostBinding('attr.aria-hidden')
164167
public get hiddenClass() {
165168
return this.collapsed;
166169
}
167170

168-
@HostBinding('class.igx-toggle--hidden-webkit')
171+
/**
172+
* @hidden
173+
*/
169174
public get hiddenWebkitClass() {
170175
const isSafari = this.platform?.isSafari;
171176
const browserVersion = this.platform?.browserVersion;
@@ -176,7 +181,6 @@ export class IgxToggleDirective implements IToggleView, OnInit, OnDestroy {
176181
/**
177182
* @hidden
178183
*/
179-
@HostBinding('class.igx-toggle')
180184
public get defaultClass() {
181185
return !this.collapsed;
182186
}
@@ -224,6 +228,16 @@ export class IgxToggleDirective implements IToggleView, OnInit, OnDestroy {
224228
}
225229

226230
this._collapsed = false;
231+
232+
// TODO: this is a workaround for the issue introduced by Angular's with Ivy renderer.
233+
// When calling detectChanges(), Angular marks the element for check, but does not update the classes
234+
// immediately, which causes the overlay to calculate incorrect dimensions of target element.
235+
// Overlay show should be called in the next tick to ensure the classes are updated and target element is measured correctly.
236+
// Note: across the codebase, each host binding should be checked and similar fix applied if needed!!!
237+
this.elementRef.nativeElement.className = this.elementRef.nativeElement.className.replace('igx-toggle--hidden', 'igx-toggle');
238+
this.elementRef.nativeElement.className = this.elementRef.nativeElement.className.replace('igx-toggle--hidden-webkit', 'igx-toggle');
239+
this.elementRef.nativeElement.removeAttribute('aria-hidden');
240+
227241
this.cdr.detectChanges();
228242

229243
if (!info) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<span igxTooltip>{{content}}</span>
1+
<span data-default igxTooltip>{{content}}</span>

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

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { DebugElement } from '@angular/core';
22
import { fakeAsync, TestBed, tick, flush, waitForAsync, ComponentFixture } from '@angular/core/testing';
33
import { By } from '@angular/platform-browser';
44
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
5-
import { IgxTooltipSingleTargetComponent, IgxTooltipMultipleTargetsComponent, IgxTooltipPlainStringComponent, IgxTooltipWithToggleActionComponent, IgxTooltipMultipleTooltipsComponent, IgxTooltipWithCloseButtonComponent } from '../../test-utils/tooltip-components.spec';
5+
import { IgxTooltipSingleTargetComponent, IgxTooltipMultipleTargetsComponent, IgxTooltipPlainStringComponent, IgxTooltipWithToggleActionComponent, IgxTooltipMultipleTooltipsComponent, IgxTooltipWithCloseButtonComponent, IgxTooltipWithNestedContentComponent } from '../../test-utils/tooltip-components.spec';
66
import { UIInteractions } from '../../test-utils/ui-interactions.spec';
77
import { HorizontalAlignment, VerticalAlignment, AutoPositionStrategy } from '../../services/public_api';
88
import { IgxTooltipDirective } from './tooltip.directive';
@@ -28,7 +28,8 @@ describe('IgxTooltip', () => {
2828
IgxTooltipMultipleTargetsComponent,
2929
IgxTooltipPlainStringComponent,
3030
IgxTooltipWithToggleActionComponent,
31-
IgxTooltipWithCloseButtonComponent
31+
IgxTooltipWithCloseButtonComponent,
32+
IgxTooltipWithNestedContentComponent
3233
]
3334
}).compileComponents();
3435
UIInteractions.clearOverlay();
@@ -500,6 +501,36 @@ describe('IgxTooltip', () => {
500501

501502
verifyTooltipVisibility(tooltipNativeElement, tooltipTarget, false);
502503
}));
504+
505+
it('Should respect default max-width constraint for plain string tooltip', fakeAsync(() => {
506+
hoverElement(button);
507+
flush();
508+
509+
verifyTooltipVisibility(tooltipNativeElement, tooltipTarget, true);
510+
511+
const maxWidth = getComputedStyle(tooltipNativeElement).maxWidth;
512+
expect(maxWidth).toBe('200px');
513+
}));
514+
});
515+
516+
describe('Custom content tooltip', () => {
517+
beforeEach(waitForAsync(() => {
518+
fix = TestBed.createComponent(IgxTooltipWithNestedContentComponent);
519+
fix.detectChanges();
520+
button = fix.debugElement.query(By.directive(IgxTooltipTargetDirective));
521+
tooltipTarget = fix.componentInstance.tooltipTarget;
522+
tooltipNativeElement = fix.debugElement.query(By.directive(IgxTooltipDirective)).nativeElement;
523+
}));
524+
525+
it('Should not have max-width constraint for custom content tooltip', fakeAsync(() => {
526+
hoverElement(button);
527+
flush();
528+
529+
verifyTooltipVisibility(tooltipNativeElement, tooltipTarget, true);
530+
531+
const maxWidth = getComputedStyle(tooltipNativeElement).maxWidth;
532+
expect(maxWidth).toBe('none');
533+
}));
503534
});
504535

505536
describe('Multiple targets with single tooltip', () => {

projects/igniteui-angular/src/lib/grids/columns/column.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,7 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy, ColumnTy
10661066
return (this.grid as any)._columns.indexOf(this);
10671067
}
10681068

1069+
/* mustCoerceToInt */
10691070
/**
10701071
* Gets the pinning position of the column.
10711072
* ```typescript

0 commit comments

Comments
 (0)