Skip to content

Commit 6475d09

Browse files
committed
chore(*): merge master #3126
2 parents cf16f0f + a311c0c commit 6475d09

File tree

74 files changed

+2674
-639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2674
-639
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ All notable changes for each version of this project will be documented in this
104104
- `igxOverlay.attach(component, settings?)` method added. Use this method to obtain an unique Id of the created overlay where the provided component will be shown. Then call `igxOverlay.show(id, settings?)` method to show the component in overlay.
105105
- `igxOverlay.show(component, settings)` is **depricated**. Use `igxOverlay.attach(component, settings?)` method to obtain an Id, and then call `igxOverlay.show(id, settings)` method to show a component in the overlay.
106106

107+
- `igx-date-picker`
108+
- **Feature** Added editable `mode` to enable the input field value editing and spinning of the date parts. Example:
109+
```html
110+
<igx-date-picker #editableDatePicker1 mode="editable" [value]="date" format="dd.MM.y" mask="M/d/y">
111+
</igx-date-picker>
112+
```
107113
**Components roundness**
108114
- Ignite UI for Angular now allows you to change the shape of components by changing their border-radius.
109115

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,9 @@ export class IgxAvatarComponent implements OnInit, AfterViewInit {
356356
return `url(${this.src})`;
357357
}
358358
}
359+
359360
/**
360-
* The `IgxAvatarModule` provides the {@link IgxAvatarComponent} inside your application.
361+
* @hidden
361362
*/
362363
@NgModule({
363364
declarations: [IgxAvatarComponent],

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,8 @@ export class IgxBadgeComponent {
182182
}
183183

184184
/**
185-
* The IgxBadgeComponent provides the {@link IgxBadgeComponent} inside your application.
185+
* @hidden
186186
*/
187-
188187
@NgModule({
189188
declarations: [IgxBadgeComponent],
190189
exports: [IgxBadgeComponent],

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ export class IgxBannerComponent implements IToggleView {
258258
this.onClosed.emit(this._bannerEvent);
259259
}
260260
}
261+
262+
/**
263+
* @hidden
264+
*/
261265
@NgModule({
262266
declarations: [IgxBannerComponent, IgxBannerActionsDirective],
263267
exports: [IgxBannerComponent, IgxBannerActionsDirective],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ export interface IButtonGroupEventArgs {
412412
}
413413

414414
/**
415-
* The IgxButtonGroupModule provides the {@link IgxButtonGroupComponent} inside your application.
415+
* @hidden
416416
*/
417417
@NgModule({
418418
declarations: [IgxButtonGroupComponent],

projects/igniteui-angular/src/lib/calendar/calendar.component.html

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,29 @@
44
</ng-template>
55

66
<ng-template let-result #defaultMonth>
7-
<span tabindex="0" #monthsBtn (keydown)="activeViewYearKB($event)" (click)="activeViewYear()" class="igx-calendar-picker__date">
7+
<span tabindex="0" #monthsBtn (keydown)="activeViewYearKB($event)" (click)="activeViewYear()"
8+
class="igx-calendar-picker__date">
89
{{ formattedMonth(viewDate) }}
910
</span>
10-
<span tabindex="0" #yearsBtn (keydown)="activeViewDecadeKB($event)" (click)="activeViewDecade()" class="igx-calendar-picker__date">
11+
<span tabindex="0" #yearsBtn (keydown)="activeViewDecadeKB($event)" (click)="activeViewDecade()"
12+
class="igx-calendar-picker__date">
1113
{{ formattedYear(viewDate) }}
1214
</span>
1315
</ng-template>
1416

15-
<div *ngIf="selection === 'single'" class="igx-calendar__header">
17+
<div *ngIf="selection === 'single' && hasHeader" class="igx-calendar__header">
1618
<h5 class="igx-calendar__header-year">{{ formattedYear(headerDate) }}</h5>
1719
<h2 class="igx-calendar__header-date">
1820
<ng-container *ngTemplateOutlet="headerTemplate ? headerTemplate : defaultHeader; context: headerContext">
1921
</ng-container>
2022
</h2>
2123
</div>
2224

23-
<div *ngIf="isDefaultView" class="igx-calendar__body" [@animateView]="activeView" (swiperight)="previousMonth()" (swipeleft)="nextMonth()">
25+
<div *ngIf="isDefaultView" class="igx-calendar__body" [@animateView]="activeView" (swiperight)="previousMonth()"
26+
(swipeleft)="nextMonth()">
2427
<div class="igx-calendar-picker">
25-
<div tabindex="0" class="igx-calendar-picker__prev" (keydown)="previousMonthKB($event)" (click)="previousMonth()">
28+
<div tabindex="0" class="igx-calendar-picker__prev" (keydown)="previousMonthKB($event)"
29+
(click)="previousMonth()">
2630
<igx-icon fontSet="material">keyboard_arrow_left</igx-icon>
2731
</div>
2832
<div>
@@ -49,16 +53,10 @@ <h2 class="igx-calendar__header-date">
4953
</igx-days-view>
5054
</div>
5155

52-
<igx-months-view *ngIf="isYearView" [@animateView]="activeView" #months
53-
[date]="viewDate"
54-
[locale]="locale"
55-
[monthFormat]="formatOptions.month"
56-
(onSelection)="changeMonth($event)" >
56+
<igx-months-view *ngIf="isYearView" [@animateView]="activeView" #months [date]="viewDate" [locale]="locale"
57+
[monthFormat]="formatOptions.month" (onSelection)="changeMonth($event)">
5758
</igx-months-view>
5859

59-
<igx-years-view *ngIf="isDecadeView" [@animateView]="activeView" #decade
60-
[date]="viewDate"
61-
[locale]="locale"
62-
[yearFormat]="formatOptions.year"
63-
(onSelection)="changeYear($event)">
64-
</igx-years-view>
60+
<igx-years-view *ngIf="isDecadeView" [@animateView]="activeView" #decade [date]="viewDate" [locale]="locale"
61+
[yearFormat]="formatOptions.year" (onSelection)="changeYear($event)">
62+
</igx-years-view>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export class IgxCalendarComponent extends IgxMonthPickerBase {
7272
@Input()
7373
public id = `igx-calendar-${NEXT_ID++}`;
7474

75+
@Input()
76+
public hasHeader = true;
77+
7578
/**
7679
* Sets/gets whether the calendar header will be in vertical position.
7780
* Default value is `false`.
@@ -130,7 +133,7 @@ export class IgxCalendarComponent extends IgxMonthPickerBase {
130133
/**
131134
* @hidden
132135
*/
133-
@ViewChild('months', {read: IgxMonthsViewComponent})
136+
@ViewChild('months', { read: IgxMonthsViewComponent })
134137
public monthsView: IgxMonthsViewComponent;
135138

136139
/**

projects/igniteui-angular/src/lib/calendar/calendar.module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import { IgxDaysViewComponent } from './days-view/days-view.component';
1515
import { IgxDayItemComponent } from './days-view/day-item.component';
1616
import { IgxMonthPickerComponent } from './month-picker/month-picker.component';
1717

18+
/**
19+
* @hidden
20+
*/
1821
@NgModule({
1922
declarations: [
2023
IgxDayItemComponent,

projects/igniteui-angular/src/lib/calendar/years-view/years-view.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,17 @@ export class IgxYearsViewComponent implements ControlValueAccessor {
244244
/**
245245
* @hidden
246246
*/
247-
public writeValue(value: Date) {
248-
if (value) {
249-
this.date = value;
250-
}
247+
public yearTracker(index, item): string {
248+
return `${item.getFullYear()}}`;
251249
}
252250

253251
/**
254252
* @hidden
255253
*/
256-
public yearTracker(index, item): string {
257-
return `${item.getFullYear()}}`;
254+
public writeValue(value: Date) {
255+
if (value) {
256+
this.date = value;
257+
}
258258
}
259259

260260
/**

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ export class IgxCardComponent {
8989
@Input()
9090
public id = `igx-card-${NEXT_ID++}`;
9191
}
92+
9293
/**
93-
* The `IgxCardModule` provides the {@link IgxCardComponent} inside your application.
94+
* @hidden
9495
*/
9596
@NgModule({
9697
declarations: [IgxCardComponent, IgxCardHeaderDirective,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,9 @@ export interface ISlideEventArgs {
562562
carousel: IgxCarouselComponent;
563563
slide: IgxSlideComponent;
564564
}
565+
565566
/**
566-
* The `IgxCarouselModule` provides the {@link IgxCarouselComponent} inside your application.
567+
* @hidden
567568
*/
568569
@NgModule({
569570
declarations: [IgxCarouselComponent, IgxSlideComponent],

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,9 @@ export const IGX_CHECKBOX_REQUIRED_VALIDATOR: Provider = {
403403
providers: [IGX_CHECKBOX_REQUIRED_VALIDATOR]
404404
})
405405
export class IgxCheckboxRequiredDirective extends CheckboxRequiredValidator { }
406+
406407
/**
407-
*The IgxCheckboxModule provides the {@link IgxCheckboxComponent} inside your application.
408+
* @hidden
408409
*/
409410
@NgModule({
410411
declarations: [IgxCheckboxComponent, IgxCheckboxRequiredDirective],

projects/igniteui-angular/src/lib/core/navigation/directives.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export class IgxNavigationCloseDirective {
5151
}
5252
}
5353

54+
/**
55+
* @hidden
56+
*/
5457
@NgModule({
5558
declarations: [IgxNavigationCloseDirective, IgxNavigationToggleDirective],
5659
exports: [IgxNavigationCloseDirective, IgxNavigationToggleDirective],

projects/igniteui-angular/src/lib/core/styles/components/date-picker/_date-picker-component.scss

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99
$this: bem--selector-to-string(&);
1010
@include register-component(str-slice($this, 2, -1));
1111

12-
.igx-dialog__window {
13-
@extend %date-picker-display !optional;
12+
@extend %date-picker !optional;
13+
14+
@include e(buttons) {
15+
@extend %date-picker__buttons !optional;
1416
}
1517

1618
@include m(vertical) {
17-
.igx-dialog__window {
18-
@extend %date-picker-display--vertical !optional;
19-
}
19+
@extend %date-picker--vertical !optional;
20+
}
21+
22+
@include m(dropdown) {
23+
@extend %date-picker--dropdown !optional;
2024
}
2125
}

projects/igniteui-angular/src/lib/core/styles/components/date-picker/_date-picker-theme.scss

Lines changed: 108 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,116 @@
55
/// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a>
66
////
77

8-
/// Date Picker
9-
/// @param {Map} $palette [$default-palette] - The palette used as basis for styling the component.
10-
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
11-
///
12-
/// @requires $default-palette
13-
/// @requires $light-schema
14-
/// @requires apply-palette
15-
/// @requires extend
16-
@function igx-date-picker-theme(
17-
$palette: $default-palette,
18-
$schema: $light-schema
19-
) {
20-
$name: 'igx-date-picker';
21-
$theme: apply-palette(map-get($schema, $name), $palette);
22-
@return extend($theme, (name: $name, palette: $palette));
23-
}
24-
25-
/// @param {Map} $theme - The theme used to style the component.
8+
/// @param {Map} $theme - The calendar theme used to style the component.
9+
/// @requires $elevations
10+
/// @requires igx-elevation
11+
/// @requires rem
2612
@mixin igx-date-picker($theme) {
27-
%date-picker-display {
28-
width: 340px;
13+
%date-picker {
14+
min-width: 200px;
15+
max-width: 340px;
16+
box-shadow: igx-elevation($elevations, 24);
17+
border-radius: rem(4px);
18+
background: --var($theme, 'content-background');
19+
overflow: hidden;
20+
21+
%cal-display {
22+
background: --var($theme, 'content-background');
23+
}
24+
25+
%cal-header-display {
26+
background-color: --var($theme, 'header-background');
27+
color: --var($theme, 'header-text-color');
28+
}
29+
30+
%cal-picker-arrow {
31+
color: --var($theme, 'picker-arrow-color');
32+
33+
&:hover {
34+
color: --var($theme, 'picker-arrow-hover-color');
35+
}
36+
}
37+
38+
%cal-picker-date {
39+
color: --var($theme, 'picker-text-color');
40+
41+
&:hover,
42+
&:focus {
43+
color: --var($theme, 'picker-text-hover-color');
44+
}
45+
}
46+
47+
%cal-value {
48+
color: --var($theme, 'content-text-color');
49+
}
50+
51+
%cal-value--label {
52+
color: --var($theme, 'inactive-text-color');
53+
}
54+
55+
%cal-value--weekend {
56+
color: --var($theme, 'weekend-text-color');
57+
}
58+
59+
%cal-value--special {
60+
color: --var($theme, 'date-special-text-color');
61+
background: --var($theme, 'date-special-background');
62+
}
63+
64+
%cal-value--disabled {
65+
color: --var($theme, 'date-disabled-text-color');
66+
}
67+
68+
%cal-value--year-current {
69+
color: --var($theme, 'year-current-text-color');
70+
}
71+
72+
%cal-value--year-hover {
73+
color: --var($theme, 'year-hover-text-color');
74+
}
75+
76+
%cal-value--month-hover {
77+
color: --var($theme, 'month-hover-text-color');
78+
}
79+
80+
%cal-value--month-current {
81+
color: --var($theme, 'month-current-text-color');
82+
}
83+
84+
%cal-value--inactive {
85+
color: --var($theme, 'inactive-text-color');
86+
}
87+
88+
%cal-value--selected {
89+
color: --var($theme, 'date-selected-text-color');
90+
background-color: --var($theme, 'date-selected-background') !important;
91+
}
92+
93+
%cal-value--current {
94+
color: --var($theme, 'date-current-text-color');
95+
}
96+
97+
%cal-value--hover {
98+
background-color: --var($theme, 'date-hover-background');
99+
}
29100
}
30101

31-
%date-picker-display--vertical {
32-
width: 540px;
102+
%date-picker--vertical {
103+
min-width: 368px; /* 168px for header + 200px for the content */
104+
max-width: 540px;
105+
}
106+
107+
%date-picker--dropdown {
108+
display: flex;
109+
flex: 1 0 0;
110+
border-top-left-radius: 0;
111+
border-top-right-radius: 0;
112+
box-shadow: igx-elevation($elevations, 3);
33113
}
34-
}
35114

115+
%date-picker__buttons {
116+
display: flex;
117+
justify-content: flex-end;
118+
padding: rem(8px);
119+
}
120+
}

projects/igniteui-angular/src/lib/core/styles/themes/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
}
166166

167167
@if not(index($exclude, 'igx-date-picker')) {
168-
@include igx-date-picker(igx-date-picker-theme($palette, $schema));
168+
@include igx-date-picker(igx-calendar-theme($palette, $schema));
169169
}
170170

171171
@if not(index($exclude, 'igx-dialog')) {

projects/igniteui-angular/src/lib/core/styles/themes/schemas/dark/_date-picker.scss

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)