Skip to content

Commit 68cbd11

Browse files
Merge branch '9.0.x' into astaev/issue1703-9.0.x
2 parents d6439b0 + adab6a7 commit 68cbd11

File tree

17 files changed

+1785
-1899
lines changed

17 files changed

+1785
-1899
lines changed

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

Lines changed: 71 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { IgxIconModule } from '../icon/index';
44

55
let NEXT_ID = 0;
66

7+
/**
8+
* Determines the igxBadge type
9+
*/
710
export enum IgxBadgeType {
811
PRIMARY = 'primary',
912
INFO = 'info',
@@ -12,28 +15,26 @@ export enum IgxBadgeType {
1215
ERROR = 'error'
1316
}
1417
/**
15-
* **Ignite UI for Angular Badge** -
16-
* [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/badge.html)
18+
* Badge provides visual notifications used to decorate avatars, menus, etc.
19+
*
20+
* @igxModule IgxBadgeModule
21+
*
22+
* @igxTheme igx-badge-theme
1723
*
24+
* @igxKeywords badge, icon, notification
25+
*
26+
* @igxGroup Data Entry & Display
27+
*
28+
* @remarks
1829
* The Ignite UI Badge is used to decorate avatars, navigation menus, or other components in the
1930
* application when visual notification is needed. They are usually designed as icons with a predefined
2031
* style to communicate information, success, warnings, or errors.
2132
*
22-
* Example:
33+
* @example
2334
* ```html
24-
* <igx-avatar icon="person" roundShape="true" size="small">
25-
* <igx-badge icon="check" type="success" class="badge-style">
26-
* </igx-badge>
35+
* <igx-avatar>
36+
* <igx-badge icon="check" type="success"></igx-badge>
2737
* </igx-avatar>
28-
* ```
29-
* The `badge-style` class is used to position the badge:
30-
* ```css
31-
* .badge-style {
32-
* position: absolute;
33-
* bottom: -6px;
34-
* right:-50px;
35-
* }
36-
* ```
3738
*/
3839
@Component({
3940
selector: 'igx-badge',
@@ -42,88 +43,113 @@ export enum IgxBadgeType {
4243
export class IgxBadgeComponent {
4344

4445
/**
45-
* An @Input property that sets the value of the `id` attribute.
46+
* Sets/gets the `id` of the badge.
47+
*
48+
* @remarks
49+
* If not set, the `id` will have value `"igx-badge-0"`.
50+
*
51+
* @example
4652
* ```html
47-
*<igx-badge id="igx-badge-2" icon="check" type="success" class="badge-style"></igx-badge>
53+
* <igx-badge id="igx-badge-2"></igx-badge>
4854
* ```
4955
*/
5056
@HostBinding('attr.id')
5157
@Input()
5258
public id = `igx-badge-${NEXT_ID++}`;
5359

5460
/**
55-
* An @Input property controlling the type of the badge.
61+
* Sets/gets the type of the badge.
62+
*
63+
* @remarks
5664
* Allowed values are `primary`, `info`, `success`, `warning`, `error`.
5765
* Providing an invalid value won't display a badge.
66+
*
67+
* @example
5868
* ```html
59-
*<igx-badge type="success" icon="check" class="badge-style"></igx-badge>
69+
* <igx-badge type="success"></igx-badge>
6070
* ```
6171
*/
6272
@Input()
6373
public type: string | IgxBadgeType = IgxBadgeType.PRIMARY;
6474

6575
/**
66-
* An @Input property that sets the value to be displayed inside the badge.
76+
* Sets/gets the value to be displayed inside the badge.
77+
*
78+
* @remarks
6779
* If an `icon` property is already set the `icon` will be displayed.
68-
* If neither a `value` nor an `icon` is set the contentent of the badge will be empty.
80+
* If neither a `value` nor an `icon` is set the content of the badge will be empty.
81+
*
82+
* @example
6983
* ```html
70-
*<igx-badge value="11" type="success" class="badge-style"></igx-badge>
84+
* <igx-badge value="11"></igx-badge>
7185
* ```
7286
*/
7387
@Input()
7488
public value = '';
7589

7690
/**
77-
* Set an icon for the badge from the material icons set.
91+
* Sets/gets an icon for the badge from the material icons set.
92+
*
93+
* @remarks
7894
* Has priority over the `value` property.
7995
* If neither a `value` nor an `icon` is set the content of the badge will be empty.
8096
* Providing an invalid value won't display anything.
97+
*
98+
* @example
8199
* ```html
82-
*<igx-badge icon="check" type="success" class="badge-style" value="11"></igx-badge>
100+
* <igx-badge icon="check"></igx-badge>
83101
* ```
84102
*/
85103
@Input()
86104
public icon: string;
87105

88106
/**
89-
* This allows you to set value to role attribute.
90-
*```html
91-
*@ViewChild("MyBadge", { read: IgxBadgeComponent })
92-
*public badge: IgxBadgeComponent;
93-
* //...
94-
*badge.label = "badge-status";
107+
* Sets/gets the role attribute value.
108+
*
109+
* @example
110+
* ```typescript
111+
* @ViewChild("MyBadge", { read: IgxBadgeComponent })
112+
* public badge: IgxBadgeComponent;
113+
*
114+
* badge.role = 'status';
95115
* ```
96116
*/
97117
@HostBinding('attr.role')
98118
public role = 'status';
99119

100120
/**
101-
* This allows you to disable igx-badge class. The default it's applied.
102-
*```html
103-
*@ViewChild("MyBadge", { read: IgxBadgeComponent })
104-
*public badge: IgxBadgeComponent;
105-
* //...
106-
*badge.cssClass = false;
121+
* Sets/gets the the css class to use on the badge.
122+
*
123+
* @example
124+
* ```typescript
125+
* @ViewChild("MyBadge", { read: IgxBadgeComponent })
126+
* public badge: IgxBadgeComponent;
127+
*
128+
* badge.cssClass = 'my-badge-class';
107129
* ```
108130
*/
109131
@HostBinding('class.igx-badge')
110132
public cssClass = 'igx-badge';
111133

112134
/**
113-
* This allows you to set value to aria-label attribute.
114-
*```html
115-
*@ViewChild("MyBadge", { read: IgxBadgeComponent })
116-
*public badge: IgxBadgeComponent;
117-
* //...
118-
*badge.label = "icon-badge";
135+
* Sets/gets the aria-label attribute value.
136+
*
137+
* @example
138+
* ```typescript
139+
* @ViewChild("MyBadge", { read: IgxBadgeComponent })
140+
* public badge: IgxBadgeComponent;
141+
*
142+
* badge.label = 'badge';
119143
* ```
120144
*/
121145
@HostBinding('attr.aria-label')
122146
public label = 'badge';
123147

124148
/**
149+
* Defines a human-readable, accessor, author-localized description for
150+
* the `type` and the `icon` or `value` of the element.
125151
* @hidden
126-
* Defines a human-readable, accessor, author-localized description for the `type` and the `icon` or `value` of the element.
152+
* @internal
127153
*/
128154
get roleDescription() {
129155
let message: string;
@@ -141,9 +167,10 @@ export class IgxBadgeComponent {
141167
}
142168

143169
/**
144-
* @hidden
145170
* Method which makes the name of the class more descriptive.
146171
* This helps the styling of the badges.
172+
* @hidden
173+
* @internal
147174
*/
148175
public setClasses() {
149176
let classes = {};

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

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ let NEXT_ID = 0;
2424
selector: 'igx-card-media'
2525
})
2626
export class IgxCardMediaDirective {
27-
/**
28-
* @hidden
29-
*/
27+
/** @hidden @internal */
3028
@HostBinding('class.igx-card__media')
3129
public cssClass = 'igx-card__media';
3230

3331
/**
3432
* An @Input property that sets the `width` and `min-width` style property
3533
* of the media container. If not provided it will be set to `auto`.
34+
*
35+
* @example
3636
* ```html
3737
* <igx-card-media width="300px"></igx-card-media>
3838
* ```
@@ -45,6 +45,8 @@ export class IgxCardMediaDirective {
4545
/**
4646
* An @Input property that sets the `height` style property of the media container.
4747
* If not provided it will be set to `auto`.
48+
*
49+
* @example
4850
* ```html
4951
* <igx-card-media height="50%"></igx-card-media>
5052
* ```
@@ -69,15 +71,15 @@ export class IgxCardMediaDirective {
6971
templateUrl: 'card-header.component.html'
7072
})
7173
export class IgxCardHeaderComponent {
72-
/**
73-
* @hidden
74-
*/
74+
/** @hidden @internal */
7575
@HostBinding('class.igx-card-header')
7676
public cssClass = 'igx-card-header';
7777

7878
/**
7979
* An @Input property that sets the layout style of the header.
8080
* By default the header elements(thumbnail and title/subtitle) are aligned horizontally.
81+
*
82+
* @example
8183
* ```html
8284
* <igx-card-header [vertical]="true"></igx-card-header>
8385
* ```
@@ -89,6 +91,8 @@ export class IgxCardHeaderComponent {
8991
/**
9092
* An @Input property that sets the value of the `role` attribute of the card header.
9193
* By default the value is set to `header`.
94+
*
95+
* @example
9296
* ```html
9397
* <igx-card-header role="header"></igx-card-header>
9498
* ```
@@ -114,9 +118,7 @@ export class IgxCardThumbnailDirective { }
114118
selector: '[igxCardHeaderTitle]'
115119
})
116120
export class IgxCardHeaderTitleDirective {
117-
/**
118-
* @hidden
119-
*/
121+
/** @hidden @internal */
120122
@HostBinding('class.igx-card-header__title')
121123
public cssClass = 'igx-card__header__title';
122124
}
@@ -129,9 +131,7 @@ export class IgxCardHeaderTitleDirective {
129131
selector: '[igxCardHeaderSubtitle]'
130132
})
131133
export class IgxCardHeaderSubtitleDirective {
132-
/**
133-
* @hidden
134-
*/
134+
/** @hidden @internal */
135135
@HostBinding('class.igx-card-header__subtitle')
136136
public cssClass = 'igx-card-header__subtitle';
137137
}
@@ -143,9 +143,7 @@ export class IgxCardHeaderSubtitleDirective {
143143
selector: 'igx-card-content'
144144
})
145145
export class IgxCardContentDirective {
146-
/**
147-
* @hidden
148-
*/
146+
/** @hidden @internal */
149147
@HostBinding('class.igx-card-content')
150148
public cssClass = 'igx-card-content';
151149
}
@@ -161,6 +159,8 @@ export class IgxCardFooterDirective {
161159
/**
162160
* An @Input property that sets the value of the `role` attribute of the card footer.
163161
* By default the value is set to `footer`.
162+
*
163+
* @example
164164
* ```html
165165
* <igx-card-footer role="footer"></igx-card-footer>
166166
* ```
@@ -171,13 +171,21 @@ export class IgxCardFooterDirective {
171171
}
172172

173173
/**
174-
* **Ignite UI for Angular Card** -
175-
* [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/card.html)
174+
* Card provides a way to display organized content in appealing way.
175+
*
176+
* @igxModule IgxCardModule
177+
*
178+
* @igxTheme igx-card-theme, igx-icon-theme, igx-button-theme
179+
*
180+
* @igxKeywords card, button, avatar, icon
181+
*
182+
* @igxGroup Layouts
176183
*
184+
* @remarks
177185
* The Ignite UI Card serves as a container that allows custom content to be organized in an appealing way. There are
178186
* five sections in a card that you can use to organize your content. These are header, media, content, actions, and footer.
179187
*
180-
* Example:
188+
* @example
181189
* ```html
182190
* <igx-card>
183191
* <igx-card-header>
@@ -205,13 +213,14 @@ export class IgxCardComponent {
205213
/**
206214
* Sets/gets the `id` of the card.
207215
* If not set, `id` will have value `"igx-card-0"`;
216+
*
217+
* @example
208218
* ```html
209219
* <igx-card id = "my-first-card"></igx-card>
210220
* ```
211221
* ```typescript
212222
* let cardId = this.card.id;
213223
* ```
214-
* @memberof IgxCardComponent
215224
*/
216225
@HostBinding('attr.id')
217226
@Input()
@@ -220,6 +229,8 @@ export class IgxCardComponent {
220229
/**
221230
* An @Input property that sets the value of the `role` attribute of the card.
222231
* By default the value is set to `group`.
232+
*
233+
* @example
223234
* ```html
224235
* <igx-card role="group"></igx-card>
225236
* ```
@@ -232,6 +243,8 @@ export class IgxCardComponent {
232243
* An @Input property that sets the value of the `type` attribute of the card.
233244
* By default the value is set to `default`. You can make the card use the
234245
* outlined style by setting the value to `outlined`.
246+
*
247+
* @example
235248
* ```html
236249
* <igx-card type="outlined"></igx-card>
237250
* ```
@@ -252,6 +265,8 @@ export class IgxCardComponent {
252265
* An @Input property that sets the value of the `horizontal` attribute of the card.
253266
* Setting this to `true` will make the different card sections align horizontally,
254267
* essentially flipping the card to the side.
268+
*
269+
* @example
255270
* ```html
256271
* <igx-card [horizontal]="true"></igx-card>
257272
* ```
@@ -286,6 +301,8 @@ export class IgxCardActionsComponent implements OnInit, OnChanges {
286301
* of the card-actions area.
287302
* You can justify the elements in those groups so they are positioned equally
288303
* from one another taking up all the space available along the card actions axis.
304+
*
305+
* @example
289306
* ```html
290307
* <igx-card-actions layout="justify"></igx-card-actions>
291308
* ```
@@ -318,6 +335,8 @@ export class IgxCardActionsComponent implements OnInit, OnChanges {
318335
* placed in the actions area.
319336
* If you want to reverse their positions so that icons appear first, use the `reverse`
320337
* attribute.
338+
*
339+
* @example
321340
* ```html
322341
* <igx-card-actions [reverse]="true"></igx-card-actions>
323342
* ```

0 commit comments

Comments
 (0)