Skip to content

Commit 054b60c

Browse files
authored
Merge branch 'master' into simeonoff/fix-8794
2 parents b4d05ac + 673a9f1 commit 054b60c

File tree

7 files changed

+45
-10
lines changed

7 files changed

+45
-10
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ All notable changes for each version of this project will be documented in this
1515
- Added new property `alignment` that determines the radio group alignment. Available options are `horizontal` (default) and `vertical`.
1616
- `IgxDialog`
1717
- Added new `onOpened` and `onClosed` events.
18+
- `IgxInputGroup`
19+
- Added new property `theme` that allows you to set the theme explicitly and at runtime.
1820

1921
## 11.0.4
2022

projects/igniteui-angular/src/lib/card/card.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export class IgxCardComponent {
243243

244244
/**
245245
* An @Input property that sets the value of the `type` attribute of the card.
246-
* By default the value is set to `default`. You can make the card use the
246+
* By default the value is set to `elevated`. You can make the card use the
247247
* outlined style by setting the value to `outlined`.
248248
*
249249
* @example

projects/igniteui-angular/src/lib/input-group/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Ignite UI for Angular Hint provides a helper text placed below the input. The hi
4848
| Name | Description |
4949
| :--- | :--- |
5050
| type | How the input will be styled. The allowed values are line, box, border and search. The default is line.|
51+
| theme | Allows the user to change the theme of the input group. |
5152
| position | **`Hint` API**. Where the hint will be placed. The allowed values are start and end. The default value is start. |
5253
| displayDensity | Allows the user to change the default display density of the input group. |
5354

projects/igniteui-angular/src/lib/input-group/input-group.component.ts

+34-8
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ export type IgxInputGroupTheme = keyof typeof IgxInputGroupThemeEnum;
4949
selector: 'igx-input-group',
5050
templateUrl: 'input-group.component.html',
5151
providers: [
52-
{ provide: IgxInputGroupBase, useExisting: IgxInputGroupComponent }
52+
{ provide: IgxInputGroupBase, useExisting: IgxInputGroupComponent },
5353
],
5454
})
5555
export class IgxInputGroupComponent extends DisplayDensityBase
5656
implements IgxInputGroupBase, AfterContentInit {
5757
private _type: IgxInputGroupType = null;
5858
private _filled = false;
59-
private _variant: IgxInputGroupTheme = 'material';
59+
private _variant: IgxInputGroupTheme;
6060

6161
/**
6262
* An @Input property that sets the value of `id` attribute. If not provided it will be automatically generated.
@@ -215,7 +215,31 @@ export class IgxInputGroupComponent extends DisplayDensityBase
215215
return this._type || this._inputGroupType || 'line';
216216
}
217217

218-
/** @hidden @internal */
218+
/**
219+
* Sets the theme of the input.
220+
* Allowed values of type IgxInputGroupTheme.
221+
* ```typescript
222+
* @ViewChild("MyInputGroup")
223+
* public inputGroup: IgxInputGroupComponent;
224+
* ngAfterViewInit() {
225+
* let inputTheme = 'fluent';
226+
* }
227+
*/
228+
@Input()
229+
public set theme(variant: IgxInputGroupTheme) {
230+
this._variant = variant;
231+
}
232+
233+
/**
234+
* Returns the theme of the input.
235+
* The returned value is of tyep IgxInputGroupType.
236+
* ```typescript
237+
* @ViewChild("MyInputGroup")
238+
* public inputGroup: IgxInputGroupComponent;
239+
* ngAfterViewInit() {
240+
* let inputTheme = this.inputGroup.theme;
241+
* }
242+
*/
219243
public get theme(): IgxInputGroupTheme {
220244
return this._variant;
221245
}
@@ -253,11 +277,13 @@ export class IgxInputGroupComponent extends DisplayDensityBase
253277
}
254278

255279
ngAfterContentInit() {
256-
const variant = this.document.defaultView
257-
.getComputedStyle(this.element.nativeElement)
258-
.getPropertyValue('--igx-input-group-variant')
259-
.trim();
260-
this._variant = variant as IgxInputGroupTheme;
280+
if (!this.theme) {
281+
const variant = this.document.defaultView
282+
.getComputedStyle(this.element.nativeElement)
283+
.getPropertyValue('--igx-input-group-variant')
284+
.trim();
285+
this._variant = variant as IgxInputGroupTheme;
286+
}
261287
}
262288
/**
263289
* Returns whether the `IgxInputGroupComponent` has hints.

projects/igniteui-angular/src/lib/slider/label/thumb-label.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import { Component, Input, TemplateRef, HostBinding, ElementRef } from '@angular
22
import { SliderHandle } from '../slider.common';
33
import { IgxSliderThumbComponent } from '../thumb/thumb-slider.component';
44

5+
/**
6+
* @hidden
7+
*/
58
@Component({
69
selector: 'igx-thumb-label',
710
templateUrl: 'thumb-label.component.html'

projects/igniteui-angular/src/lib/slider/ticks/tick.pipe.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { Pipe, PipeTransform } from '@angular/core';
22

3+
/**
4+
* @hidden
5+
*/
36
@Pipe({
47
name: 'spreadTickLabels'
58
})

src/app/input-group/input-group.sample.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<br />
6161

6262
<!-- text field prefix/suffix -->
63-
<igx-input-group [displayDensity]="density" [type]="inputType">
63+
<igx-input-group [displayDensity]="density" [type]="inputType" theme="fluent">
6464
<label igxLabel>Web address</label>
6565
<igx-prefix>
6666
http://

0 commit comments

Comments
 (0)