@progress/kendo-angular-dateinputs 5.3.1-dev.202112011809 → 6.0.0-dev.202201181611

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-dateinputs.js +2 -2
  5. package/dist/cdn/main.js +1 -1
  6. package/dist/es/calendar/calendar.component.js +14 -2
  7. package/dist/es/calendar/header.component.js +1 -1
  8. package/dist/es/calendar/multiview-calendar.component.js +28 -12
  9. package/dist/es/calendar/multiview-calendar.module.js +9 -1
  10. package/dist/es/calendar/services/dom.service.js +1 -1
  11. package/dist/es/calendar/view.component.js +1 -1
  12. package/dist/es/common/models/fillmode.js +4 -0
  13. package/dist/es/common/models/rounded.js +4 -0
  14. package/dist/es/common/models/size.js +4 -0
  15. package/dist/es/dateinput/dateinput.component.js +143 -18
  16. package/dist/es/datepicker/datepicker.component.js +130 -13
  17. package/dist/es/daterange/date-range-input.js +1 -1
  18. package/dist/es/datetimepicker/datetimepicker.component.js +147 -11
  19. package/dist/es/package-metadata.js +1 -1
  20. package/dist/es/timepicker/services/dom.service.js +12 -8
  21. package/dist/es/timepicker/timelist.component.js +3 -2
  22. package/dist/es/timepicker/timepicker.component.js +130 -13
  23. package/dist/es/timepicker/timeselector.component.js +2 -2
  24. package/dist/es/util.js +37 -0
  25. package/dist/es2015/calendar/calendar.component.d.ts +7 -0
  26. package/dist/es2015/calendar/calendar.component.js +14 -2
  27. package/dist/es2015/calendar/header.component.js +4 -4
  28. package/dist/es2015/calendar/multiview-calendar.component.d.ts +8 -2
  29. package/dist/es2015/calendar/multiview-calendar.component.js +31 -11
  30. package/dist/es2015/calendar/multiview-calendar.module.js +9 -1
  31. package/dist/es2015/calendar/services/dom.service.js +1 -1
  32. package/dist/es2015/calendar/view.component.js +1 -1
  33. package/dist/es2015/common/models/fillmode.d.ts +14 -0
  34. package/dist/es2015/common/models/fillmode.js +4 -0
  35. package/dist/es2015/common/models/rounded.d.ts +15 -0
  36. package/dist/es2015/common/models/rounded.js +4 -0
  37. package/dist/es2015/common/models/size.d.ts +14 -0
  38. package/dist/es2015/common/models/size.js +4 -0
  39. package/dist/es2015/dateinput/dateinput.component.d.ts +49 -8
  40. package/dist/es2015/dateinput/dateinput.component.js +183 -68
  41. package/dist/es2015/datepicker/datepicker.component.d.ts +47 -5
  42. package/dist/es2015/datepicker/datepicker.component.js +155 -49
  43. package/dist/es2015/daterange/date-range-input.js +1 -1
  44. package/dist/es2015/datetimepicker/datetimepicker.component.d.ts +56 -6
  45. package/dist/es2015/datetimepicker/datetimepicker.component.js +186 -63
  46. package/dist/es2015/index.metadata.json +1 -1
  47. package/dist/es2015/package-metadata.js +1 -1
  48. package/dist/es2015/timepicker/services/dom.service.d.ts +1 -0
  49. package/dist/es2015/timepicker/services/dom.service.js +12 -8
  50. package/dist/es2015/timepicker/timelist.component.js +3 -2
  51. package/dist/es2015/timepicker/timepicker.component.d.ts +50 -5
  52. package/dist/es2015/timepicker/timepicker.component.js +174 -69
  53. package/dist/es2015/timepicker/timeselector.component.js +7 -5
  54. package/dist/es2015/util.d.ts +18 -0
  55. package/dist/es2015/util.js +37 -0
  56. package/dist/fesm2015/index.js +821 -290
  57. package/dist/fesm5/index.js +663 -92
  58. package/dist/npm/calendar/calendar.component.js +14 -2
  59. package/dist/npm/calendar/header.component.js +1 -1
  60. package/dist/npm/calendar/multiview-calendar.component.js +27 -11
  61. package/dist/npm/calendar/multiview-calendar.module.js +9 -1
  62. package/dist/npm/calendar/services/dom.service.js +1 -1
  63. package/dist/npm/calendar/view.component.js +1 -1
  64. package/dist/npm/common/models/fillmode.js +6 -0
  65. package/dist/npm/common/models/rounded.js +6 -0
  66. package/dist/npm/common/models/size.js +6 -0
  67. package/dist/npm/dateinput/dateinput.component.js +142 -17
  68. package/dist/npm/datepicker/datepicker.component.js +129 -12
  69. package/dist/npm/daterange/date-range-input.js +1 -1
  70. package/dist/npm/datetimepicker/datetimepicker.component.js +146 -10
  71. package/dist/npm/package-metadata.js +1 -1
  72. package/dist/npm/timepicker/services/dom.service.js +15 -10
  73. package/dist/npm/timepicker/timelist.component.js +3 -2
  74. package/dist/npm/timepicker/timepicker.component.js +129 -12
  75. package/dist/npm/timepicker/timeselector.component.js +2 -2
  76. package/dist/npm/util.js +37 -0
  77. package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
  78. package/package.json +2 -2
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { __decorate, __metadata, __param } from 'tslib';
6
- import { Injectable, EventEmitter, Injector, Input, TemplateRef, Output, HostBinding, Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, Renderer2, isDevMode, Directive, forwardRef, ContentChild, ViewChild, HostListener, NgZone, InjectionToken, Inject, Optional, ViewContainerRef, ViewChildren, QueryList, ContentChildren, IterableDiffers, NgModule } from '@angular/core';
6
+ import { Injectable, EventEmitter, Injector, Input, TemplateRef, Output, HostBinding, Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, Renderer2, isDevMode, Directive, forwardRef, ContentChild, ViewChild, HostListener, Optional, NgZone, InjectionToken, Inject, ViewContainerRef, ViewChildren, QueryList, ContentChildren, IterableDiffers, NgModule } from '@angular/core';
7
7
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
8
8
  import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages } from '@progress/kendo-angular-l10n';
9
9
  import { getDate, isEqual, cloneDate, addDays, addDecades, addCenturies, firstDecadeOfCentury, lastDecadeOfCentury, firstYearOfDecade, createDate, lastYearOfDecade, lastMonthOfYear, lastDayOfMonth, durationInCenturies, addYears, durationInDecades, addWeeks, addMonths, firstDayOfMonth, dayOfWeek, durationInMonths, firstMonthOfYear, durationInYears, weekInYear } from '@progress/kendo-date-math';
@@ -23,7 +23,7 @@ const packageMetadata = {
23
23
  name: '@progress/kendo-angular-dateinputs',
24
24
  productName: 'Kendo UI for Angular',
25
25
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
26
- publishDate: 1638381906,
26
+ publishDate: 1642521990,
27
27
  version: '',
28
28
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
29
29
  };
@@ -443,6 +443,43 @@ const isTabExitingCalendar = (calendarType, focusedElement, shiftKey) => {
443
443
  (!shiftKey && focusedElement.classList.contains('k-next-view')) // exited on next button focused and regular tab
444
444
  );
445
445
  };
446
+ /**
447
+ * @hidden
448
+ * Returns the size class based on the component and size input.
449
+ */
450
+ const getSizeClass = (component, size) => {
451
+ const SIZE_CLASSES = {
452
+ 'small': `k-${component}-sm`,
453
+ 'medium': `k-${component}-md`,
454
+ 'large': `k-${component}-lg`
455
+ };
456
+ return SIZE_CLASSES[size];
457
+ };
458
+ /**
459
+ * @hidden
460
+ * Returns the rounded class based on the rounded input.
461
+ */
462
+ const getRoundedClass = (rounded) => {
463
+ const ROUNDED_CLASSES = {
464
+ 'small': 'k-rounded-sm',
465
+ 'medium': 'k-rounded-md',
466
+ 'large': 'k-rounded-lg',
467
+ 'full': 'k-rounded-full'
468
+ };
469
+ return ROUNDED_CLASSES[rounded];
470
+ };
471
+ /**
472
+ * @hidden
473
+ * Return the fillMode class based on the component and fillMode input.
474
+ */
475
+ const getFillModeClass = (component, fillMode) => {
476
+ const FILLMODE_CLASSES = {
477
+ 'solid': `k-${component}-solid`,
478
+ 'flat': `k-${component}-flat`,
479
+ 'outline': `k-${component}-outline`
480
+ };
481
+ return FILLMODE_CLASSES[fillMode];
482
+ };
446
483
 
447
484
  const EMPTY_DATA = [[]];
448
485
  const CELLS_LENGTH = 4;
@@ -1845,7 +1882,7 @@ HeaderComponent = __decorate([
1845
1882
  Component({
1846
1883
  selector: 'kendo-calendar-header',
1847
1884
  template: `
1848
- <span class="k-button k-flat k-title k-calendar-title" [class.k-state-disabled]="!navigate"
1885
+ <span class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title" [class.k-disabled]="!navigate"
1849
1886
  [kendoEventsOutsideAngular]="{
1850
1887
  click: handleNavigation
1851
1888
  }"
@@ -1861,7 +1898,7 @@ HeaderComponent = __decorate([
1861
1898
  <span class="k-calendar-nav k-hstack">
1862
1899
  <button
1863
1900
  *ngIf="showNavigationButtons"
1864
- class="k-button k-flat k-icon-button k-prev-view"
1901
+ class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-prev-view"
1865
1902
  type="button"
1866
1903
  [attr.aria-disabled]="isPrevDisabled"
1867
1904
  [disabled]="isPrevDisabled"
@@ -1872,7 +1909,7 @@ HeaderComponent = __decorate([
1872
1909
  </button>
1873
1910
  <span
1874
1911
  class="k-today k-nav-today"
1875
- [class.k-state-disabled]="!todayAvailable"
1912
+ [class.k-disabled]="!todayAvailable"
1876
1913
  [kendoEventsOutsideAngular]="{
1877
1914
  click: handleTodayClick
1878
1915
  }"
@@ -1882,7 +1919,7 @@ HeaderComponent = __decorate([
1882
1919
  </span>
1883
1920
  <button
1884
1921
  *ngIf="showNavigationButtons"
1885
- class="k-button k-flat k-icon-button k-next-view"
1922
+ class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-next-view"
1886
1923
  type="button"
1887
1924
  [attr.aria-disabled]="isNextDisabled"
1888
1925
  [disabled]="isNextDisabled"
@@ -2310,6 +2347,18 @@ const disabledDatesRangeValidator = (isDateDisabled) => {
2310
2347
  };
2311
2348
  };
2312
2349
 
2350
+ /**
2351
+ * @hidden
2352
+ */
2353
+ class PickerService {
2354
+ constructor() {
2355
+ this.onFocus = new EventEmitter();
2356
+ this.onBlur = new EventEmitter();
2357
+ this.sameDateSelected = new EventEmitter();
2358
+ this.dateCompletenessChange = new EventEmitter();
2359
+ }
2360
+ }
2361
+
2313
2362
  const BOTTOM_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
2314
2363
  const TOP_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
2315
2364
  const MIN_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
@@ -2346,7 +2395,7 @@ const RANGE_CALENDAR_RANGE_VALIDATORS = {
2346
2395
  * ```
2347
2396
  */
2348
2397
  let MultiViewCalendarComponent = class MultiViewCalendarComponent {
2349
- constructor(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService) {
2398
+ constructor(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService, pickerService) {
2350
2399
  this.bus = bus;
2351
2400
  this.element = element;
2352
2401
  this.navigator = navigator;
@@ -2355,6 +2404,7 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
2355
2404
  this.zone = zone;
2356
2405
  this.disabledDatesService = disabledDatesService;
2357
2406
  this.selectionService = selectionService;
2407
+ this.pickerService = pickerService;
2358
2408
  /**
2359
2409
  * @hidden
2360
2410
  */
@@ -2641,21 +2691,22 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
2641
2691
  /**
2642
2692
  * @hidden
2643
2693
  */
2644
- handleBlur(event) {
2645
- const target = event.target;
2646
- if (!this.element.nativeElement.contains(event.relatedTarget)) {
2694
+ handleFocusout(event) {
2695
+ const relatedTarget = event.relatedTarget;
2696
+ if (!this.element.nativeElement.contains(relatedTarget)) {
2647
2697
  this.blurEvent.emit(event);
2648
2698
  this.onControlTouched();
2649
2699
  }
2650
2700
  this.isActive = false;
2651
2701
  this.isHovered = false; //ensure that hovered is also not active
2652
- this.isHeaderActive = this.headerElement.nativeElement.contains(target);
2702
+ this.isHeaderActive = this.headerElement.nativeElement.contains(relatedTarget);
2653
2703
  }
2654
2704
  /**
2655
2705
  * @hidden
2656
2706
  */
2657
2707
  handleFocus() {
2658
2708
  this.isActive = true;
2709
+ this.isHeaderActive = false;
2659
2710
  }
2660
2711
  /**
2661
2712
  * @hidden
@@ -2688,7 +2739,13 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
2688
2739
  * @hidden
2689
2740
  */
2690
2741
  keydown(event) {
2742
+ if (this.isHeaderActive) {
2743
+ return;
2744
+ }
2691
2745
  if (event.keyCode === Keys.Enter) {
2746
+ if (isPresent(this.pickerService)) {
2747
+ event.preventDefault(); // Don't submit form from Datepicker popup
2748
+ }
2692
2749
  this.performSelection(this.focusedDate, event);
2693
2750
  }
2694
2751
  const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
@@ -2763,6 +2820,12 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
2763
2820
  }
2764
2821
  this.element.nativeElement.blur();
2765
2822
  }
2823
+ /**
2824
+ * @hidden
2825
+ */
2826
+ handleHeaderFocus() {
2827
+ this.isHeaderActive = true;
2828
+ }
2766
2829
  /**
2767
2830
  * @hidden
2768
2831
  */
@@ -3169,7 +3232,7 @@ __decorate([
3169
3232
  ], MultiViewCalendarComponent.prototype, "calendarTabIndex", null);
3170
3233
  __decorate([
3171
3234
  HostBinding('attr.aria-disabled'),
3172
- HostBinding('class.k-state-disabled'),
3235
+ HostBinding('class.k-disabled'),
3173
3236
  __metadata("design:type", Boolean),
3174
3237
  __metadata("design:paramtypes", [])
3175
3238
  ], MultiViewCalendarComponent.prototype, "ariaDisabled", null);
@@ -3181,9 +3244,9 @@ __decorate([
3181
3244
  __decorate([
3182
3245
  HostListener('focusout', ['$event']),
3183
3246
  __metadata("design:type", Function),
3184
- __metadata("design:paramtypes", [FocusEvent]),
3247
+ __metadata("design:paramtypes", [Object]),
3185
3248
  __metadata("design:returntype", void 0)
3186
- ], MultiViewCalendarComponent.prototype, "handleBlur", null);
3249
+ ], MultiViewCalendarComponent.prototype, "handleFocusout", null);
3187
3250
  __decorate([
3188
3251
  HostListener("focus"),
3189
3252
  __metadata("design:type", Function),
@@ -3263,6 +3326,10 @@ MultiViewCalendarComponent = __decorate([
3263
3326
  (todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
3264
3327
  (prevButtonClick)="navigateView(prevView)"
3265
3328
  (nextButtonClick)="navigateView(nextView)"
3329
+ [kendoEventsOutsideAngular]="{
3330
+ focusin: handleHeaderFocus
3331
+ }"
3332
+ [scope]="this"
3266
3333
  >
3267
3334
  </kendo-calendar-header>
3268
3335
  <kendo-calendar-horizontal
@@ -3291,6 +3358,7 @@ MultiViewCalendarComponent = __decorate([
3291
3358
  </kendo-calendar-horizontal>
3292
3359
  `
3293
3360
  }),
3361
+ __param(8, Optional()),
3294
3362
  __metadata("design:paramtypes", [BusViewService,
3295
3363
  ElementRef,
3296
3364
  NavigationService,
@@ -3298,7 +3366,8 @@ MultiViewCalendarComponent = __decorate([
3298
3366
  ChangeDetectorRef,
3299
3367
  NgZone,
3300
3368
  DisabledDatesService,
3301
- SelectionService])
3369
+ SelectionService,
3370
+ PickerService])
3302
3371
  ], MultiViewCalendarComponent);
3303
3372
 
3304
3373
  const div = domContainerFactory('div');
@@ -3311,7 +3380,7 @@ const tbody = domContainerFactory('tbody');
3311
3380
  const thead = domContainerFactory('thead');
3312
3381
  const table = domContainerFactory('table');
3313
3382
  const monthHeader = () => (div(`
3314
- <span class="k-button k-flat k-title k-calendar-title">March 2017</span>
3383
+ <span class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title">March 2017</span>
3315
3384
  <span class="k-spacer"></span>
3316
3385
  <span class="k-calendar-nav k-hstack">
3317
3386
  <span class="k-today k-nav-today">TODAY</span>
@@ -4565,18 +4634,6 @@ NavigationItemTemplateDirective = __decorate([
4565
4634
  __metadata("design:paramtypes", [TemplateRef])
4566
4635
  ], NavigationItemTemplateDirective);
4567
4636
 
4568
- /**
4569
- * @hidden
4570
- */
4571
- class PickerService {
4572
- constructor() {
4573
- this.onFocus = new EventEmitter();
4574
- this.onBlur = new EventEmitter();
4575
- this.sameDateSelected = new EventEmitter();
4576
- this.dateCompletenessChange = new EventEmitter();
4577
- }
4578
- }
4579
-
4580
4637
  const BOTTOM_VIEW_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
4581
4638
  const TOP_VIEW_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
4582
4639
  const MIN_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
@@ -5139,6 +5196,14 @@ let CalendarComponent = class CalendarComponent {
5139
5196
  return null;
5140
5197
  }
5141
5198
  }
5199
+ /**
5200
+ * @hidden
5201
+ */
5202
+ handleNavigate(event) {
5203
+ this.focusedDate = event.focusedDate;
5204
+ this.activeView = event.activeView;
5205
+ this.emitNavigate(this.focusedDate);
5206
+ }
5142
5207
  /**
5143
5208
  * @hidden
5144
5209
  */
@@ -5277,6 +5342,10 @@ let CalendarComponent = class CalendarComponent {
5277
5342
  }
5278
5343
  }
5279
5344
  handleKeydown(args) {
5345
+ const headerActive = this.type === 'classic' && this.multiViewCalendar.isHeaderActive;
5346
+ if (headerActive) {
5347
+ return;
5348
+ }
5280
5349
  // reserve the alt + arrow key commands for the picker
5281
5350
  const arrowKeyPressed = [Keys.ArrowUp, Keys.ArrowRight, Keys.ArrowDown, Keys.ArrowLeft].indexOf(args.keyCode) !== -1;
5282
5351
  if (isPresent(this.pickerService) && arrowKeyPressed && args.altKey) {
@@ -5526,7 +5595,7 @@ __decorate([
5526
5595
  ], CalendarComponent.prototype, "calendarTabIndex", null);
5527
5596
  __decorate([
5528
5597
  HostBinding('attr.aria-disabled'),
5529
- HostBinding('class.k-state-disabled'),
5598
+ HostBinding('class.k-disabled'),
5530
5599
  __metadata("design:type", Boolean),
5531
5600
  __metadata("design:paramtypes", [])
5532
5601
  ], CalendarComponent.prototype, "ariaDisabled", null);
@@ -5622,7 +5691,7 @@ CalendarComponent = __decorate([
5622
5691
  [value]="value"
5623
5692
  [disabledDates]="disabledDates"
5624
5693
  (activeViewChange)="handleActiveViewChange($event)"
5625
- (navigate)="navigate.emit($event)"
5694
+ (navigate)="handleNavigate($event)"
5626
5695
  (valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
5627
5696
  (focus)="handleFocus()"
5628
5697
  (blur)="handleBlur($event)"
@@ -6105,11 +6174,11 @@ class KendoDate {
6105
6174
  * Represents the [Kendo UI DateInput component for Angular]({% slug overview_dateinput %}#toc-basic-usage).
6106
6175
  */
6107
6176
  let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
6108
- constructor(cdr, intl, renderer, element, ngZone, injector, localization, pickerService) {
6177
+ constructor(cdr, intl, renderer, wrapper, ngZone, injector, localization, pickerService) {
6109
6178
  this.cdr = cdr;
6110
6179
  this.intl = intl;
6111
6180
  this.renderer = renderer;
6112
- this.element = element;
6181
+ this.wrapper = wrapper;
6113
6182
  this.ngZone = ngZone;
6114
6183
  this.injector = injector;
6115
6184
  this.localization = localization;
@@ -6311,6 +6380,9 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
6311
6380
  this.onControlChange = noop;
6312
6381
  this.onControlTouched = noop;
6313
6382
  this.onValidatorChange = noop;
6383
+ this._size = 'medium';
6384
+ this._rounded = 'medium';
6385
+ this._fillMode = 'solid';
6314
6386
  this.symbolsMap = this.dateSymbolMap();
6315
6387
  this.updateFormatSections();
6316
6388
  if (this.pickerService) {
@@ -6342,6 +6414,71 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
6342
6414
  get value() {
6343
6415
  return this._value;
6344
6416
  }
6417
+ /**
6418
+ * Sets the size of the component.
6419
+ *
6420
+ * The possible values are:
6421
+ * * `'small'`
6422
+ * * `'medium'` (Default)
6423
+ * * `'large'`
6424
+ * * `null`
6425
+ *
6426
+ */
6427
+ set size(size) {
6428
+ this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
6429
+ if (size) {
6430
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
6431
+ }
6432
+ this._size = size;
6433
+ }
6434
+ get size() {
6435
+ return this._size;
6436
+ }
6437
+ /**
6438
+ * Sets the border radius of the component.
6439
+ *
6440
+ * The possible values are:
6441
+ * * `'small'`
6442
+ * * `'medium'` (Default)
6443
+ * * `'large'`
6444
+ * * `'full'`
6445
+ * * `null`
6446
+ *
6447
+ */
6448
+ set rounded(rounded) {
6449
+ this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
6450
+ if (rounded) {
6451
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
6452
+ }
6453
+ this._rounded = rounded;
6454
+ }
6455
+ get rounded() {
6456
+ return this._rounded;
6457
+ }
6458
+ /**
6459
+ * Sets the fillMode of the component.
6460
+ *
6461
+ * The possible values are:
6462
+ * * `'solid'` (Default)
6463
+ * * `'flat'`
6464
+ * * `'outline'`
6465
+ * * `null`
6466
+ *
6467
+ */
6468
+ set fillMode(fillMode) {
6469
+ this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
6470
+ if (fillMode) {
6471
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
6472
+ if (this.spinners && this.spinup && this.spindown) {
6473
+ this.setSpinnerFill(this.spinup.nativeElement, fillMode, this.fillMode);
6474
+ this.setSpinnerFill(this.spindown.nativeElement, fillMode, this.fillMode);
6475
+ }
6476
+ }
6477
+ this._fillMode = fillMode;
6478
+ }
6479
+ get fillMode() {
6480
+ return this._fillMode;
6481
+ }
6345
6482
  get wrapperClass() {
6346
6483
  return true;
6347
6484
  }
@@ -6359,16 +6496,16 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
6359
6496
  }
6360
6497
  set isActive(value) {
6361
6498
  this._active = value;
6362
- if (!this.wrap) {
6499
+ if (!this.wrapper) {
6363
6500
  return;
6364
6501
  }
6365
6502
  if (!isPresent(this.pickerService)) {
6366
- const element = this.wrap.nativeElement;
6503
+ const element = this.wrapper.nativeElement;
6367
6504
  if (value) {
6368
- this.renderer.addClass(element, 'k-state-focused');
6505
+ this.renderer.addClass(element, 'k-focus');
6369
6506
  }
6370
6507
  else {
6371
- this.renderer.removeClass(element, 'k-state-focused');
6508
+ this.renderer.removeClass(element, 'k-focus');
6372
6509
  }
6373
6510
  }
6374
6511
  }
@@ -6405,7 +6542,7 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
6405
6542
  * @hidden
6406
6543
  */
6407
6544
  containsElement(element) {
6408
- return Boolean(closest(element, node => node === this.element.nativeElement));
6545
+ return Boolean(closest(element, node => node === this.wrapper.nativeElement));
6409
6546
  }
6410
6547
  /**
6411
6548
  * @hidden
@@ -6457,13 +6594,16 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
6457
6594
  this.updateElementValue();
6458
6595
  this.intlSubscription = this.intl.changes.subscribe(this.intlChange.bind(this));
6459
6596
  this.ngControl = this.injector.get(NgControl, null);
6460
- if (this.element) {
6461
- this.renderer.removeAttribute(this.element.nativeElement, 'tabindex');
6597
+ if (this.wrapper) {
6598
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
6462
6599
  this.ngZone.runOutsideAngular(() => {
6463
6600
  this.bindEvents();
6464
6601
  });
6465
6602
  }
6466
6603
  }
6604
+ ngAfterViewInit() {
6605
+ this.setComponentClasses();
6606
+ }
6467
6607
  /**
6468
6608
  * @hidden
6469
6609
  */
@@ -6812,7 +6952,7 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
6812
6952
  }
6813
6953
  }
6814
6954
  bindEvents() {
6815
- const element = this.element.nativeElement;
6955
+ const element = this.wrapper.nativeElement;
6816
6956
  const mousewheelHandler = this.handleMouseWheel.bind(this);
6817
6957
  this.domEvents.push(this.renderer.listen(element, 'DOMMouseScroll', mousewheelHandler), this.renderer.listen(element, 'mousewheel', mousewheelHandler), this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)), this.renderer.listen(element, 'paste', this.handlePaste.bind(this)), this.renderer.listen(element, 'input', this.handleInput.bind(this)));
6818
6958
  }
@@ -6943,6 +7083,29 @@ let DateInputComponent = DateInputComponent_1 = class DateInputComponent {
6943
7083
  this.pickerService.dateCompletenessChange.emit();
6944
7084
  }
6945
7085
  }
7086
+ setSpinnerFill(spinner, fill, oldFill) {
7087
+ if (oldFill) {
7088
+ this.renderer.removeClass(spinner, `k-button-${oldFill}`);
7089
+ this.renderer.removeClass(spinner, `k-button-${oldFill}-base`);
7090
+ }
7091
+ this.renderer.addClass(spinner, `k-button-${fill}`);
7092
+ this.renderer.addClass(spinner, `k-button-${fill}-base`);
7093
+ }
7094
+ setComponentClasses() {
7095
+ if (this.size) {
7096
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
7097
+ }
7098
+ if (this.rounded) {
7099
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
7100
+ }
7101
+ if (this.fillMode) {
7102
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
7103
+ }
7104
+ if (this.spinners) {
7105
+ this.setSpinnerFill(this.spinup.nativeElement, this.fillMode);
7106
+ this.setSpinnerFill(this.spindown.nativeElement, this.fillMode);
7107
+ }
7108
+ }
6946
7109
  };
6947
7110
  __decorate([
6948
7111
  Input(),
@@ -7034,6 +7197,21 @@ __decorate([
7034
7197
  Input(),
7035
7198
  __metadata("design:type", Boolean)
7036
7199
  ], DateInputComponent.prototype, "hasPopup", void 0);
7200
+ __decorate([
7201
+ Input(),
7202
+ __metadata("design:type", String),
7203
+ __metadata("design:paramtypes", [String])
7204
+ ], DateInputComponent.prototype, "size", null);
7205
+ __decorate([
7206
+ Input(),
7207
+ __metadata("design:type", String),
7208
+ __metadata("design:paramtypes", [String])
7209
+ ], DateInputComponent.prototype, "rounded", null);
7210
+ __decorate([
7211
+ Input(),
7212
+ __metadata("design:type", String),
7213
+ __metadata("design:paramtypes", [String])
7214
+ ], DateInputComponent.prototype, "fillMode", null);
7037
7215
  __decorate([
7038
7216
  Output(),
7039
7217
  __metadata("design:type", EventEmitter)
@@ -7055,20 +7233,24 @@ __decorate([
7055
7233
  __metadata("design:type", ElementRef)
7056
7234
  ], DateInputComponent.prototype, "dateInput", void 0);
7057
7235
  __decorate([
7058
- ViewChild('wrap', { static: false }),
7059
- __metadata("design:type", ElementRef)
7060
- ], DateInputComponent.prototype, "wrap", void 0);
7061
- __decorate([
7062
- HostBinding('class.k-widget'),
7236
+ HostBinding('class.k-input'),
7063
7237
  HostBinding('class.k-dateinput'),
7064
7238
  __metadata("design:type", Boolean),
7065
7239
  __metadata("design:paramtypes", [])
7066
7240
  ], DateInputComponent.prototype, "wrapperClass", null);
7067
7241
  __decorate([
7068
- HostBinding('class.k-state-disabled'),
7242
+ HostBinding('class.k-disabled'),
7069
7243
  __metadata("design:type", Boolean),
7070
7244
  __metadata("design:paramtypes", [])
7071
7245
  ], DateInputComponent.prototype, "disabledClass", null);
7246
+ __decorate([
7247
+ ViewChild('spinup', { static: false }),
7248
+ __metadata("design:type", ElementRef)
7249
+ ], DateInputComponent.prototype, "spinup", void 0);
7250
+ __decorate([
7251
+ ViewChild('spindown', { static: false }),
7252
+ __metadata("design:type", ElementRef)
7253
+ ], DateInputComponent.prototype, "spindown", void 0);
7072
7254
  DateInputComponent = DateInputComponent_1 = __decorate([
7073
7255
  Component({
7074
7256
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -7090,57 +7272,59 @@ DateInputComponent = DateInputComponent_1 = __decorate([
7090
7272
  decrement="Decrease value"
7091
7273
  >
7092
7274
  </ng-container>
7093
- <span class="k-dateinput-wrap" #wrap>
7094
- <input
7095
- #dateInput
7096
- autocomplete="off"
7097
- autocorrect="off"
7098
- autocapitalize="off"
7099
- spellcheck="false"
7100
- class="k-input"
7101
- [attr.role]="role"
7102
- [attr.aria-readonly]="ariaReadOnly"
7103
- [id]="focusableId"
7104
- [title]="title"
7105
- [tabindex]="tabindex"
7106
- [disabled]="disabled"
7107
- [readonly]="readonly"
7108
- [placeholder]="placeholder"
7109
- [attr.aria-expanded]="isPopupOpen"
7110
- [attr.aria-haspopup]="hasPopup"
7111
- [kendoEventsOutsideAngular]="{
7112
- click: handleClick,
7113
- focus: handleFocus,
7114
- mousedown: handleMousedown,
7115
- touchstart: handleMousedown,
7116
- dragstart: handleDragAndDrop,
7117
- drop: handleDragAndDrop,
7118
- blur: handleBlur
7119
- }"
7120
- [scope]="this"
7121
- />
7122
- <span *ngIf="spinners" class="k-select" (mousedown)="$event.preventDefault()">
7123
- <span
7124
- class="k-link k-link-increase"
7125
- [class.k-state-active]="arrowDirection === arrow.Up"
7126
- (mousedown)="arrowDirection = arrow.Up"
7127
- (mouseleave)="arrowDirection = arrow.None"
7128
- (click)="handleButtonClick(1)"
7129
- [title]="localization.get('increment')"
7130
- [attr.aria-label]="localization.get('increment')">
7131
- <span class="k-icon k-i-arrow-n"></span>
7132
- </span>
7133
- <span
7134
- class="k-link k-link-decrease"
7135
- (click)="handleButtonClick(-1)"
7136
- [class.k-state-active]="arrowDirection === arrow.Down"
7137
- (mousedown)="arrowDirection = arrow.Down"
7138
- (mouseleave)="arrowDirection = arrow.None"
7139
- [title]="localization.get('decrement')"
7140
- [attr.aria-label]="localization.get('decrement')">
7141
- <span class="k-icon k-i-arrow-s"></span>
7142
- </span>
7143
- </span>
7275
+ <input
7276
+ #dateInput
7277
+ autocomplete="off"
7278
+ autocorrect="off"
7279
+ autocapitalize="off"
7280
+ spellcheck="false"
7281
+ class="k-input-inner"
7282
+ [attr.role]="role"
7283
+ [attr.aria-readonly]="ariaReadOnly"
7284
+ [id]="focusableId"
7285
+ [title]="title"
7286
+ [tabindex]="tabindex"
7287
+ [disabled]="disabled"
7288
+ [readonly]="readonly"
7289
+ [placeholder]="placeholder"
7290
+ [attr.aria-expanded]="isPopupOpen"
7291
+ [attr.aria-haspopup]="hasPopup"
7292
+ [kendoEventsOutsideAngular]="{
7293
+ click: handleClick,
7294
+ focus: handleFocus,
7295
+ mousedown: handleMousedown,
7296
+ touchstart: handleMousedown,
7297
+ dragstart: handleDragAndDrop,
7298
+ drop: handleDragAndDrop,
7299
+ blur: handleBlur
7300
+ }"
7301
+ [scope]="this"
7302
+ />
7303
+ <span *ngIf="spinners" class="k-input-spinner k-spin-button" (mousedown)="$event.preventDefault()">
7304
+ <button
7305
+ #spinup
7306
+ tabindex="-1"
7307
+ class="k-spinner-increase k-button k-icon-button"
7308
+ [class.k-active]="arrowDirection === arrow.Up"
7309
+ (mousedown)="arrowDirection = arrow.Up"
7310
+ (mouseleave)="arrowDirection = arrow.None"
7311
+ (click)="handleButtonClick(1)"
7312
+ [title]="localization.get('increment')"
7313
+ [attr.aria-label]="localization.get('increment')">
7314
+ <span class="k-button-icon k-icon k-i-arrow-n"></span>
7315
+ </button>
7316
+ <button
7317
+ #spindown
7318
+ tabindex="-1"
7319
+ class="k-spinner-decrease k-button k-icon-button"
7320
+ (click)="handleButtonClick(-1)"
7321
+ [class.k-active]="arrowDirection === arrow.Down"
7322
+ (mousedown)="arrowDirection = arrow.Down"
7323
+ (mouseleave)="arrowDirection = arrow.None"
7324
+ [title]="localization.get('decrement')"
7325
+ [attr.aria-label]="localization.get('decrement')">
7326
+ <span class="k-button-icon k-icon k-i-arrow-s"></span>
7327
+ </button>
7144
7328
  </span>
7145
7329
  `
7146
7330
  }),
@@ -7210,12 +7394,12 @@ const TWO_DIGIT_YEAR_MAX$1 = 68;
7210
7394
  * Represents the [Kendo UI DatePicker component for Angular]({% slug overview_datepicker %}#toc-basic-usage).
7211
7395
  */
7212
7396
  let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
7213
- constructor(zone, localization, cdr, popupService, element, renderer, injector, pickerService, disabledDatesService, touchEnabled$$1) {
7397
+ constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, disabledDatesService, touchEnabled$$1) {
7214
7398
  this.zone = zone;
7215
7399
  this.localization = localization;
7216
7400
  this.cdr = cdr;
7217
7401
  this.popupService = popupService;
7218
- this.element = element;
7402
+ this.wrapper = wrapper;
7219
7403
  this.renderer = renderer;
7220
7404
  this.injector = injector;
7221
7405
  this.pickerService = pickerService;
@@ -7441,6 +7625,9 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
7441
7625
  this.incompleteValidator = noop;
7442
7626
  this.resolvedPromise = Promise.resolve(null);
7443
7627
  this.domEvents = [];
7628
+ this._size = 'medium';
7629
+ this._rounded = 'medium';
7630
+ this._fillMode = 'solid';
7444
7631
  validatePackage(packageMetadata);
7445
7632
  this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
7446
7633
  this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
@@ -7542,6 +7729,73 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
7542
7729
  get disabledDates() {
7543
7730
  return this._disabledDates;
7544
7731
  }
7732
+ /**
7733
+ * Sets the size of the component.
7734
+ *
7735
+ * The possible values are:
7736
+ * * `'small'`
7737
+ * * `'medium'` (Default)
7738
+ * * `'large'`
7739
+ * * `null`
7740
+ *
7741
+ */
7742
+ set size(size) {
7743
+ this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
7744
+ this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
7745
+ if (size) {
7746
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
7747
+ this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
7748
+ }
7749
+ this._size = size;
7750
+ }
7751
+ get size() {
7752
+ return this._size;
7753
+ }
7754
+ /**
7755
+ * Sets the border radius of the component.
7756
+ *
7757
+ * The possible values are:
7758
+ * * `'small'`
7759
+ * * `'medium'` (Default)
7760
+ * * `'large'`
7761
+ * * `'full'`
7762
+ * * `null`
7763
+ *
7764
+ */
7765
+ set rounded(rounded) {
7766
+ this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
7767
+ if (rounded) {
7768
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
7769
+ }
7770
+ this._rounded = rounded;
7771
+ }
7772
+ get rounded() {
7773
+ return this._rounded;
7774
+ }
7775
+ /**
7776
+ * Sets the fillMode of the component.
7777
+ *
7778
+ * The possible values are:
7779
+ * * `'solid'` (Default)
7780
+ * * `'flat'`
7781
+ * * `'outline'`
7782
+ * * `null`
7783
+ *
7784
+ */
7785
+ set fillMode(fillMode) {
7786
+ this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
7787
+ this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
7788
+ this.renderer.removeClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
7789
+ if (fillMode) {
7790
+ this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
7791
+ this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${fillMode}-base`);
7792
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
7793
+ }
7794
+ this._fillMode = fillMode;
7795
+ }
7796
+ get fillMode() {
7797
+ return this._fillMode;
7798
+ }
7545
7799
  /**
7546
7800
  * @hidden
7547
7801
  */
@@ -7564,10 +7818,10 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
7564
7818
  }
7565
7819
  const element = this.wrapper.nativeElement;
7566
7820
  if (value) {
7567
- this.renderer.addClass(element, 'k-state-focused');
7821
+ this.renderer.addClass(element, 'k-focus');
7568
7822
  }
7569
7823
  else {
7570
- this.renderer.removeClass(element, 'k-state-focused');
7824
+ this.renderer.removeClass(element, 'k-focus');
7571
7825
  }
7572
7826
  }
7573
7827
  get show() {
@@ -7602,13 +7856,16 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
7602
7856
  .changes
7603
7857
  .subscribe(() => this.cdr.markForCheck());
7604
7858
  this.control = this.injector.get(NgControl, null);
7605
- if (this.element) {
7606
- this.renderer.removeAttribute(this.element.nativeElement, 'tabindex');
7859
+ if (this.wrapper) {
7860
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
7607
7861
  this.zone.runOutsideAngular(() => {
7608
7862
  this.bindEvents();
7609
7863
  });
7610
7864
  }
7611
7865
  }
7866
+ ngAfterViewInit() {
7867
+ this.setComponentClasses();
7868
+ }
7612
7869
  /**
7613
7870
  * @hidden
7614
7871
  */
@@ -7810,6 +8067,9 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
7810
8067
  this.show = false;
7811
8068
  }
7812
8069
  }
8070
+ if (keyCode === Keys.Enter && target.classList.contains('k-calendar')) {
8071
+ e.preventDefault(); // Don't submit form on date selection in popup
8072
+ }
7813
8073
  if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
7814
8074
  this.input.focus();
7815
8075
  this.show = false;
@@ -7897,7 +8157,7 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
7897
8157
  }
7898
8158
  }
7899
8159
  bindEvents() {
7900
- const element = this.element.nativeElement;
8160
+ const element = this.wrapper.nativeElement;
7901
8161
  this.domEvents.push(this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
7902
8162
  if (isWindowAvailable()) {
7903
8163
  this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this));
@@ -7953,6 +8213,20 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
7953
8213
  this.cdr.markForCheck();
7954
8214
  this.zone.run(() => this.onValidatorChange());
7955
8215
  }
8216
+ setComponentClasses() {
8217
+ if (this.size) {
8218
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
8219
+ this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
8220
+ }
8221
+ if (this.rounded) {
8222
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
8223
+ }
8224
+ if (this.fillMode) {
8225
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
8226
+ this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
8227
+ this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
8228
+ }
8229
+ }
7956
8230
  };
7957
8231
  __decorate([
7958
8232
  ViewChild('container', { read: ViewContainerRef, static: true }),
@@ -7963,9 +8237,9 @@ __decorate([
7963
8237
  __metadata("design:type", TemplateRef)
7964
8238
  ], DatePickerComponent.prototype, "popupTemplate", void 0);
7965
8239
  __decorate([
7966
- ViewChild('wrapper', { static: false }),
8240
+ ViewChild('toggleButton', { static: true }),
7967
8241
  __metadata("design:type", ElementRef)
7968
- ], DatePickerComponent.prototype, "wrapper", void 0);
8242
+ ], DatePickerComponent.prototype, "toggleButton", void 0);
7969
8243
  __decorate([
7970
8244
  ContentChild(CellTemplateDirective, { static: false }),
7971
8245
  __metadata("design:type", CellTemplateDirective)
@@ -8150,6 +8424,21 @@ __decorate([
8150
8424
  Input(),
8151
8425
  __metadata("design:type", Boolean)
8152
8426
  ], DatePickerComponent.prototype, "weekNumber", void 0);
8427
+ __decorate([
8428
+ Input(),
8429
+ __metadata("design:type", String),
8430
+ __metadata("design:paramtypes", [String])
8431
+ ], DatePickerComponent.prototype, "size", null);
8432
+ __decorate([
8433
+ Input(),
8434
+ __metadata("design:type", String),
8435
+ __metadata("design:paramtypes", [String])
8436
+ ], DatePickerComponent.prototype, "rounded", null);
8437
+ __decorate([
8438
+ Input(),
8439
+ __metadata("design:type", String),
8440
+ __metadata("design:paramtypes", [String])
8441
+ ], DatePickerComponent.prototype, "fillMode", null);
8153
8442
  __decorate([
8154
8443
  Output(),
8155
8444
  __metadata("design:type", EventEmitter)
@@ -8171,12 +8460,12 @@ __decorate([
8171
8460
  __metadata("design:type", EventEmitter)
8172
8461
  ], DatePickerComponent.prototype, "close", void 0);
8173
8462
  __decorate([
8174
- HostBinding('class.k-widget'),
8175
8463
  HostBinding('class.k-datepicker'),
8464
+ HostBinding('class.k-input'),
8176
8465
  __metadata("design:type", Boolean)
8177
8466
  ], DatePickerComponent.prototype, "wrapperClasses", void 0);
8178
8467
  __decorate([
8179
- HostBinding('class.k-state-disabled'),
8468
+ HostBinding('class.k-disabled'),
8180
8469
  __metadata("design:type", Boolean),
8181
8470
  __metadata("design:paramtypes", [])
8182
8471
  ], DatePickerComponent.prototype, "disabledClass", null);
@@ -8212,44 +8501,45 @@ DatePickerComponent = DatePickerComponent_1 = __decorate([
8212
8501
  nextButtonTitle="Navigate to next view"
8213
8502
  >
8214
8503
  </ng-container>
8215
- <span #wrapper
8216
- class="k-picker-wrap"
8217
- [class.k-state-disabled]="disabled"
8504
+ <kendo-dateinput
8505
+ #input
8506
+ [role]="inputRole"
8507
+ [focusableId]="focusableId"
8508
+ [hasPopup]="true"
8509
+ [isPopupOpen]="show"
8510
+ [disabled]="disabled"
8511
+ [readonly]="readonly || readOnlyInput"
8512
+ [ariaReadOnly]="readonly"
8513
+ [tabindex]="tabindex"
8514
+ [title]="title"
8515
+ [format]="format"
8516
+ [twoDigitYearMax]="twoDigitYearMax"
8517
+ [formatPlaceholder]="formatPlaceholder"
8518
+ [placeholder]="placeholder"
8519
+ [min]="min"
8520
+ [max]="max"
8521
+ [incompleteDateValidation]="incompleteDateValidation"
8522
+ [fillMode]="null"
8523
+ [rounded]="null"
8524
+ [size]="null"
8525
+ [value]="value"
8526
+ (valueChange)="handleInputChange($event)"
8527
+ ></kendo-dateinput>
8528
+ <button
8529
+ #toggleButton
8530
+ type="button"
8531
+ class="k-input-button k-button k-icon-button"
8532
+ [tabindex]="-1"
8533
+ [attr.title]="localization.get('toggle')"
8534
+ [attr.aria-label]="localization.get('toggle')"
8535
+ [kendoEventsOutsideAngular]="{
8536
+ click: handleIconClick,
8537
+ mousedown: handleMousedown
8538
+ }"
8539
+ [scope]="this"
8218
8540
  >
8219
- <kendo-dateinput
8220
- #input
8221
- [role]="inputRole"
8222
- [focusableId]="focusableId"
8223
- [hasPopup]="true"
8224
- [isPopupOpen]="show"
8225
- [disabled]="disabled"
8226
- [readonly]="readonly || readOnlyInput"
8227
- [ariaReadOnly]="readonly"
8228
- [tabindex]="tabindex"
8229
- [title]="title"
8230
- [format]="format"
8231
- [twoDigitYearMax]="twoDigitYearMax"
8232
- [formatPlaceholder]="formatPlaceholder"
8233
- [placeholder]="placeholder"
8234
- [min]="min"
8235
- [max]="max"
8236
- [incompleteDateValidation]="incompleteDateValidation"
8237
- [value]="value"
8238
- (valueChange)="handleInputChange($event)"
8239
- ></kendo-dateinput>
8240
- <span class="k-select"
8241
- role="button"
8242
- [attr.title]="localization.get('toggle')"
8243
- [attr.aria-label]="localization.get('toggle')"
8244
- [kendoEventsOutsideAngular]="{
8245
- click: handleIconClick,
8246
- mousedown: handleMousedown
8247
- }"
8248
- [scope]="this"
8249
- >
8250
- <span class="k-icon k-i-calendar"></span>
8251
- </span>
8252
- </span>
8541
+ <span class="k-button-icon k-icon k-i-calendar"></span>
8542
+ </button>
8253
8543
  <ng-container #container></ng-container>
8254
8544
  <ng-template #popupTemplate>
8255
8545
  <kendo-calendar
@@ -8340,12 +8630,12 @@ const formatRegExp = new RegExp(`${TIME_PART.hour}|${TIME_PART.minute}|${TIME_PA
8340
8630
  * Represents the [Kendo UI TimePicker component for Angular]({% slug overview_timepicker %}#toc-basic-usage).
8341
8631
  */
8342
8632
  let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
8343
- constructor(zone, localization, cdr, popupService, element, renderer, injector, pickerService, intl, touchEnabled$$1) {
8633
+ constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, intl, touchEnabled$$1) {
8344
8634
  this.zone = zone;
8345
8635
  this.localization = localization;
8346
8636
  this.cdr = cdr;
8347
8637
  this.popupService = popupService;
8348
- this.element = element;
8638
+ this.wrapper = wrapper;
8349
8639
  this.renderer = renderer;
8350
8640
  this.injector = injector;
8351
8641
  this.pickerService = pickerService;
@@ -8507,6 +8797,9 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
8507
8797
  this._value = null;
8508
8798
  this._active = false;
8509
8799
  this.domEvents = [];
8800
+ this._size = 'medium';
8801
+ this._rounded = 'medium';
8802
+ this._fillMode = 'solid';
8510
8803
  validatePackage(packageMetadata);
8511
8804
  this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
8512
8805
  this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
@@ -8592,6 +8885,73 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
8592
8885
  get value() {
8593
8886
  return this._value;
8594
8887
  }
8888
+ /**
8889
+ * Sets the size of the component.
8890
+ *
8891
+ * The possible values are:
8892
+ * * `'small'`
8893
+ * * `'medium'` (Default)
8894
+ * * `'large'`
8895
+ * * `null`
8896
+ *
8897
+ */
8898
+ set size(size) {
8899
+ this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
8900
+ this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
8901
+ if (size) {
8902
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
8903
+ this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
8904
+ }
8905
+ this._size = size;
8906
+ }
8907
+ get size() {
8908
+ return this._size;
8909
+ }
8910
+ /**
8911
+ * Sets the border radius of the component.
8912
+ *
8913
+ * The possible values are:
8914
+ * * `'small'`
8915
+ * * `'medium'` (Default)
8916
+ * * `'large'`
8917
+ * * `'full'`
8918
+ * * `null`
8919
+ *
8920
+ */
8921
+ set rounded(rounded) {
8922
+ this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
8923
+ if (rounded) {
8924
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
8925
+ }
8926
+ this._rounded = rounded;
8927
+ }
8928
+ get rounded() {
8929
+ return this._rounded;
8930
+ }
8931
+ /**
8932
+ * Sets the fillMode of the component.
8933
+ *
8934
+ * The possible values are:
8935
+ * * `'solid'` (Default)
8936
+ * * `'flat'`
8937
+ * * `'outline'`
8938
+ * * `null`
8939
+ *
8940
+ */
8941
+ set fillMode(fillMode) {
8942
+ this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
8943
+ this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
8944
+ this.renderer.removeClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
8945
+ if (fillMode) {
8946
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
8947
+ this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
8948
+ this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${fillMode}-base`);
8949
+ }
8950
+ this._fillMode = fillMode;
8951
+ }
8952
+ get fillMode() {
8953
+ return this._fillMode;
8954
+ }
8595
8955
  /**
8596
8956
  * @hidden
8597
8957
  */
@@ -8614,10 +8974,10 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
8614
8974
  }
8615
8975
  const element = this.wrapper.nativeElement;
8616
8976
  if (value) {
8617
- this.renderer.addClass(element, 'k-state-focused');
8977
+ this.renderer.addClass(element, 'k-focus');
8618
8978
  }
8619
8979
  else {
8620
- this.renderer.removeClass(element, 'k-state-focused');
8980
+ this.renderer.removeClass(element, 'k-focus');
8621
8981
  }
8622
8982
  }
8623
8983
  get show() {
@@ -8657,13 +9017,19 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
8657
9017
  this.localizationChangeSubscription = this.localization
8658
9018
  .changes.subscribe(() => this.cdr.markForCheck());
8659
9019
  this.control = this.injector.get(NgControl, null);
8660
- if (this.element) {
8661
- this.renderer.removeAttribute(this.element.nativeElement, 'tabindex');
9020
+ if (this.wrapper) {
9021
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
8662
9022
  this.zone.runOutsideAngular(() => {
8663
9023
  this.bindEvents();
8664
9024
  });
8665
9025
  }
8666
9026
  }
9027
+ /**
9028
+ * @hidden
9029
+ */
9030
+ ngAfterViewInit() {
9031
+ this.setComponentClasses();
9032
+ }
8667
9033
  /**
8668
9034
  * @hidden
8669
9035
  */
@@ -8961,7 +9327,7 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
8961
9327
  }
8962
9328
  }
8963
9329
  bindEvents() {
8964
- const element = this.element.nativeElement;
9330
+ const element = this.wrapper.nativeElement;
8965
9331
  this.domEvents.push(this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
8966
9332
  if (isWindowAvailable()) {
8967
9333
  this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this));
@@ -9010,6 +9376,20 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
9010
9376
  this.cdr.markForCheck();
9011
9377
  this.zone.run(() => this.onValidatorChange());
9012
9378
  }
9379
+ setComponentClasses() {
9380
+ if (this.size) {
9381
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
9382
+ this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
9383
+ }
9384
+ if (this.rounded) {
9385
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
9386
+ }
9387
+ if (this.fillMode) {
9388
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
9389
+ this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
9390
+ this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
9391
+ }
9392
+ }
9013
9393
  };
9014
9394
  __decorate([
9015
9395
  ViewChild('container', { read: ViewContainerRef, static: false }),
@@ -9020,9 +9400,9 @@ __decorate([
9020
9400
  __metadata("design:type", TemplateRef)
9021
9401
  ], TimePickerComponent.prototype, "popupTemplate", void 0);
9022
9402
  __decorate([
9023
- ViewChild('wrapper', { static: false }),
9403
+ ViewChild('toggleButton', { static: true }),
9024
9404
  __metadata("design:type", ElementRef)
9025
- ], TimePickerComponent.prototype, "wrapper", void 0);
9405
+ ], TimePickerComponent.prototype, "toggleButton", void 0);
9026
9406
  __decorate([
9027
9407
  Input(),
9028
9408
  __metadata("design:type", String)
@@ -9105,6 +9485,21 @@ __decorate([
9105
9485
  __metadata("design:type", Date),
9106
9486
  __metadata("design:paramtypes", [Date])
9107
9487
  ], TimePickerComponent.prototype, "value", null);
9488
+ __decorate([
9489
+ Input(),
9490
+ __metadata("design:type", String),
9491
+ __metadata("design:paramtypes", [String])
9492
+ ], TimePickerComponent.prototype, "size", null);
9493
+ __decorate([
9494
+ Input(),
9495
+ __metadata("design:type", String),
9496
+ __metadata("design:paramtypes", [String])
9497
+ ], TimePickerComponent.prototype, "rounded", null);
9498
+ __decorate([
9499
+ Input(),
9500
+ __metadata("design:type", String),
9501
+ __metadata("design:paramtypes", [String])
9502
+ ], TimePickerComponent.prototype, "fillMode", null);
9108
9503
  __decorate([
9109
9504
  Output(),
9110
9505
  __metadata("design:type", EventEmitter)
@@ -9126,12 +9521,12 @@ __decorate([
9126
9521
  __metadata("design:type", EventEmitter)
9127
9522
  ], TimePickerComponent.prototype, "close", void 0);
9128
9523
  __decorate([
9129
- HostBinding('class.k-widget'),
9130
9524
  HostBinding('class.k-timepicker'),
9525
+ HostBinding('class.k-input'),
9131
9526
  __metadata("design:type", Boolean)
9132
9527
  ], TimePickerComponent.prototype, "wrapperClasses", void 0);
9133
9528
  __decorate([
9134
- HostBinding('class.k-state-disabled'),
9529
+ HostBinding('class.k-disabled'),
9135
9530
  __metadata("design:type", Boolean),
9136
9531
  __metadata("design:paramtypes", [])
9137
9532
  ], TimePickerComponent.prototype, "disabledClass", null);
@@ -9175,73 +9570,73 @@ TimePickerComponent = TimePickerComponent_1 = __decorate([
9175
9570
  toggle="Toggle time list"
9176
9571
  >
9177
9572
  </ng-container>
9178
- <span #wrapper
9179
- class="k-picker-wrap"
9180
- [class.k-state-disabled]="disabled"
9573
+ <kendo-dateinput
9574
+ #input
9575
+ [focusableId]="focusableId"
9576
+ [hasPopup]="true"
9577
+ [isPopupOpen]="show"
9578
+ [disabled]="disabled"
9579
+ [readonly]="readonly || readOnlyInput"
9580
+ [role]="inputRole"
9581
+ [ariaReadOnly]="readonly"
9582
+ [format]="format"
9583
+ [formatPlaceholder]="formatPlaceholder"
9584
+ [placeholder]="placeholder"
9585
+ [min]="normalizeTime(min)"
9586
+ [max]="normalizeTime(max)"
9587
+ [incompleteDateValidation]="incompleteDateValidation"
9588
+ [fillMode]="fillMode"
9589
+ [rounded]="rounded"
9590
+ [size]="size"
9591
+ [steps]="steps"
9592
+ [tabindex]="!show ? tabindex : -1"
9593
+ [title]="title"
9594
+ [value]="value"
9595
+ (valueChange)="handleInputChange($event)"
9596
+ ></kendo-dateinput>
9597
+ <button
9598
+ #toggleButton
9599
+ type="button"
9600
+ class="k-input-button k-button k-icon-button"
9601
+ [attr.title]="localization.get('toggle')"
9602
+ [attr.aria-label]="localization.get('toggle')"
9603
+ [kendoEventsOutsideAngular]="{
9604
+ click: handleIconClick,
9605
+ mousedown: handleMousedown
9606
+ }"
9607
+ [scope]="this"
9181
9608
  >
9182
- <kendo-dateinput
9183
- #input
9184
- [focusableId]="focusableId"
9185
- [hasPopup]="true"
9186
- [isPopupOpen]="show"
9187
- [disabled]="disabled"
9188
- [readonly]="readonly || readOnlyInput"
9189
- [role]="inputRole"
9190
- [ariaReadOnly]="readonly"
9609
+ <span class="k-button-icon k-icon k-i-clock"></span>
9610
+ </button>
9611
+ <ng-template #popupTemplate>
9612
+ <kendo-timeselector
9613
+ #timeSelector
9614
+ [cancelButton]="cancelButton"
9615
+ [nowButton]="nowButton"
9191
9616
  [format]="format"
9192
- [formatPlaceholder]="formatPlaceholder"
9193
- [placeholder]="placeholder"
9194
- [min]="normalizeTime(min)"
9195
- [max]="normalizeTime(max)"
9196
- [incompleteDateValidation]="incompleteDateValidation"
9617
+ [min]="min"
9618
+ [max]="max"
9197
9619
  [steps]="steps"
9198
- [tabindex]="!show ? tabindex : -1"
9199
- [title]="title"
9200
9620
  [value]="value"
9201
- (valueChange)="handleInputChange($event)"
9202
- ></kendo-dateinput>
9203
- <span class="k-select"
9204
- role="button"
9205
- [attr.title]="localization.get('toggle')"
9206
- [attr.aria-label]="localization.get('toggle')"
9207
9621
  [kendoEventsOutsideAngular]="{
9208
- click: handleIconClick,
9622
+ keydown: handleKeydown,
9209
9623
  mousedown: handleMousedown
9210
9624
  }"
9211
9625
  [scope]="this"
9626
+ (valueChange)="handleChange($event)"
9627
+ (valueReject)="handleReject()"
9212
9628
  >
9213
- <span class="k-icon k-i-clock"></span>
9214
- </span>
9215
- <ng-template #popupTemplate>
9216
- <kendo-timeselector
9217
- #timeSelector
9218
- [cancelButton]="cancelButton"
9219
- [nowButton]="nowButton"
9220
- [format]="format"
9221
- [min]="min"
9222
- [max]="max"
9223
- [steps]="steps"
9224
- [value]="value"
9225
- [kendoEventsOutsideAngular]="{
9226
- keydown: handleKeydown,
9227
- mousedown: handleMousedown
9228
- }"
9229
- [scope]="this"
9230
- (valueChange)="handleChange($event)"
9231
- (valueReject)="handleReject()"
9629
+ <kendo-timeselector-messages
9630
+ [acceptLabel]="localization.get('acceptLabel')"
9631
+ [accept]="localization.get('accept')"
9632
+ [cancelLabel]="localization.get('cancelLabel')"
9633
+ [cancel]="localization.get('cancel')"
9634
+ [nowLabel]="localization.get('nowLabel')"
9635
+ [now]="localization.get('now')"
9232
9636
  >
9233
- <kendo-timeselector-messages
9234
- [acceptLabel]="localization.get('acceptLabel')"
9235
- [accept]="localization.get('accept')"
9236
- [cancelLabel]="localization.get('cancelLabel')"
9237
- [cancel]="localization.get('cancel')"
9238
- [nowLabel]="localization.get('nowLabel')"
9239
- [now]="localization.get('now')"
9240
- >
9241
- </kendo-timeselector-messages>
9242
- </kendo-timeselector>
9243
- </ng-template>
9244
- </span>
9637
+ </kendo-timeselector-messages>
9638
+ </kendo-timeselector>
9639
+ </ng-template>
9245
9640
  <ng-container #container></ng-container>
9246
9641
  `
9247
9642
  }),
@@ -9269,13 +9664,13 @@ const TWO_DIGIT_YEAR_MAX$2 = 68;
9269
9664
  * Represents the [Kendo UI DateTimePicker component for Angular]({% slug overview_datetimepicker %}).
9270
9665
  */
9271
9666
  let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerComponent {
9272
- constructor(popupService, intl, cdr, pickerService, ngZone, host, touchEnabled$$1, localization, disabledDatesService, renderer) {
9667
+ constructor(popupService, intl, cdr, pickerService, ngZone, wrapper, touchEnabled$$1, localization, disabledDatesService, renderer) {
9273
9668
  this.popupService = popupService;
9274
9669
  this.intl = intl;
9275
9670
  this.cdr = cdr;
9276
9671
  this.pickerService = pickerService;
9277
9672
  this.ngZone = ngZone;
9278
- this.host = host;
9673
+ this.wrapper = wrapper;
9279
9674
  this.touchEnabled = touchEnabled$$1;
9280
9675
  this.localization = localization;
9281
9676
  this.disabledDatesService = disabledDatesService;
@@ -9442,8 +9837,17 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
9442
9837
  this.disabledDatesValidateFn = noop;
9443
9838
  this.incompleteValidator = noop;
9444
9839
  this.subscriptions = new Subscription();
9840
+ this._size = 'medium';
9841
+ this._rounded = 'medium';
9842
+ this._fillMode = 'solid';
9445
9843
  validatePackage(packageMetadata);
9446
9844
  }
9845
+ /**
9846
+ * @hidden
9847
+ */
9848
+ get disabledClass() {
9849
+ return this.disabled;
9850
+ }
9447
9851
  /**
9448
9852
  * @hidden
9449
9853
  */
@@ -9579,10 +9983,10 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
9579
9983
  }
9580
9984
  set isActive(value) {
9581
9985
  if (value) {
9582
- this.renderer.addClass(this.wrapper.nativeElement, 'k-state-focused');
9986
+ this.renderer.addClass(this.wrapper.nativeElement, 'k-focus');
9583
9987
  }
9584
9988
  else {
9585
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-state-focused');
9989
+ this.renderer.removeClass(this.wrapper.nativeElement, 'k-focus');
9586
9990
  }
9587
9991
  this._isActive = value;
9588
9992
  }
@@ -9597,6 +10001,73 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
9597
10001
  get defaultTab() {
9598
10002
  return this._defaultTab;
9599
10003
  }
10004
+ /**
10005
+ * Sets the size of the component.
10006
+ *
10007
+ * The possible values are:
10008
+ * * `'small'`
10009
+ * * `'medium'` (Default)
10010
+ * * `'large'`
10011
+ * * `null`
10012
+ *
10013
+ */
10014
+ set size(size) {
10015
+ this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
10016
+ this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
10017
+ if (size) {
10018
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
10019
+ this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
10020
+ }
10021
+ this._size = size;
10022
+ }
10023
+ get size() {
10024
+ return this._size;
10025
+ }
10026
+ /**
10027
+ * Sets the border radius of the component.
10028
+ *
10029
+ * The possible values are:
10030
+ * * `'small'`
10031
+ * * `'medium'` (Default)
10032
+ * * `'large'`
10033
+ * * `'full'`
10034
+ * * `null`
10035
+ *
10036
+ */
10037
+ set rounded(rounded) {
10038
+ this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
10039
+ if (rounded) {
10040
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
10041
+ }
10042
+ this._rounded = rounded;
10043
+ }
10044
+ get rounded() {
10045
+ return this._rounded;
10046
+ }
10047
+ /**
10048
+ * Sets the fillMode of the component.
10049
+ *
10050
+ * The possible values are:
10051
+ * * `'solid'` (Default)
10052
+ * * `'flat'`
10053
+ * * `'outline'`
10054
+ * * `null`
10055
+ *
10056
+ */
10057
+ set fillMode(fillMode) {
10058
+ this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
10059
+ this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
10060
+ this.renderer.removeClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
10061
+ if (fillMode) {
10062
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
10063
+ this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
10064
+ this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${fillMode}-base`);
10065
+ }
10066
+ this._fillMode = fillMode;
10067
+ }
10068
+ get fillMode() {
10069
+ return this._fillMode;
10070
+ }
9600
10071
  /**
9601
10072
  * @hidden
9602
10073
  */
@@ -9662,6 +10133,9 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
9662
10133
  this.subscriptions.add(this.ngZone.runOutsideAngular(() => fromEvent(window, 'blur').subscribe(this.handleCancel.bind(this))));
9663
10134
  }
9664
10135
  }
10136
+ ngAfterViewInit() {
10137
+ this.setComponentClasses();
10138
+ }
9665
10139
  ngOnChanges(changes) {
9666
10140
  if (isPresent(changes.min) || isPresent(changes.max)) {
9667
10141
  this.verifyMinMaxRange();
@@ -9813,7 +10287,7 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
9813
10287
  return;
9814
10288
  }
9815
10289
  this.isActive = false;
9816
- const isNgControlUntouched = this.host.nativeElement.classList.contains('ng-untouched');
10290
+ const isNgControlUntouched = this.wrapper.nativeElement.classList.contains('ng-untouched');
9817
10291
  const runInZone = isNgControlUntouched || hasObservers(this.onBlur) || (this.isOpen && hasObservers(this.close));
9818
10292
  this.run(runInZone, () => {
9819
10293
  this.onBlur.emit();
@@ -9938,6 +10412,13 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
9938
10412
  this.input.focus();
9939
10413
  }
9940
10414
  }
10415
+ /**
10416
+ * @hidden
10417
+ */
10418
+ popupButtonsClasses(type) {
10419
+ const buttonType = type ? type : 'base';
10420
+ return `${this.size ? getSizeClass('button', this.size) : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''} ${this.fillMode ? 'k-button-' + this.fillMode + ' ' + 'k-button-' + this.fillMode + '-' + buttonType : ''}`;
10421
+ }
9941
10422
  /**
9942
10423
  * @hidden
9943
10424
  *
@@ -10061,7 +10542,7 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
10061
10542
  }
10062
10543
  /**
10063
10544
  * Indicates whether the focus target is part of this component,
10064
- * that is, whether the focus target is inside the component wrapper or in the popup.
10545
+ * that is, whether the focus target is inside the component or in the popup.
10065
10546
  */
10066
10547
  focusTargetInComponent(event) {
10067
10548
  if (!isPresent(event)) {
@@ -10107,16 +10588,35 @@ let DateTimePickerComponent = DateTimePickerComponent_1 = class DateTimePickerCo
10107
10588
  this.cdr.markForCheck();
10108
10589
  this.ngZone.run(() => this.onValidatorChange());
10109
10590
  }
10591
+ setComponentClasses() {
10592
+ if (this.size) {
10593
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
10594
+ this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
10595
+ }
10596
+ if (this.rounded) {
10597
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
10598
+ }
10599
+ if (this.fillMode) {
10600
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
10601
+ this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
10602
+ this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
10603
+ }
10604
+ }
10110
10605
  };
10111
10606
  __decorate([
10112
- HostBinding('class.k-widget'),
10113
10607
  HostBinding('class.k-datetimepicker'),
10608
+ HostBinding('class.k-input'),
10114
10609
  __metadata("design:type", Boolean)
10115
10610
  ], DateTimePickerComponent.prototype, "hostClasses", void 0);
10116
10611
  __decorate([
10117
- ViewChild('wrapper', { static: true }),
10612
+ HostBinding('class.k-disabled'),
10613
+ __metadata("design:type", Boolean),
10614
+ __metadata("design:paramtypes", [])
10615
+ ], DateTimePickerComponent.prototype, "disabledClass", null);
10616
+ __decorate([
10617
+ ViewChild('toggleButton', { static: true }),
10118
10618
  __metadata("design:type", ElementRef)
10119
- ], DateTimePickerComponent.prototype, "wrapper", void 0);
10619
+ ], DateTimePickerComponent.prototype, "toggleButton", void 0);
10120
10620
  __decorate([
10121
10621
  Input(),
10122
10622
  __metadata("design:type", Date),
@@ -10245,6 +10745,21 @@ __decorate([
10245
10745
  __metadata("design:type", String),
10246
10746
  __metadata("design:paramtypes", [String])
10247
10747
  ], DateTimePickerComponent.prototype, "defaultTab", null);
10748
+ __decorate([
10749
+ Input(),
10750
+ __metadata("design:type", String),
10751
+ __metadata("design:paramtypes", [String])
10752
+ ], DateTimePickerComponent.prototype, "size", null);
10753
+ __decorate([
10754
+ Input(),
10755
+ __metadata("design:type", String),
10756
+ __metadata("design:paramtypes", [String])
10757
+ ], DateTimePickerComponent.prototype, "rounded", null);
10758
+ __decorate([
10759
+ Input(),
10760
+ __metadata("design:type", String),
10761
+ __metadata("design:paramtypes", [String])
10762
+ ], DateTimePickerComponent.prototype, "fillMode", null);
10248
10763
  __decorate([
10249
10764
  ContentChild(CellTemplateDirective, { static: false }),
10250
10765
  __metadata("design:type", CellTemplateDirective)
@@ -10343,56 +10858,55 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
10343
10858
  >
10344
10859
  </ng-container>
10345
10860
 
10346
- <span
10347
- #wrapper
10348
- class="k-picker-wrap"
10349
- [class.k-state-disabled]="disabled"
10861
+ <kendo-dateinput
10862
+ [value]="value"
10863
+ [format]="format"
10864
+ [twoDigitYearMax]="twoDigitYearMax"
10865
+ [min]="min"
10866
+ [max]="max"
10867
+ [incompleteDateValidation]="incompleteDateValidation"
10868
+ [formatPlaceholder]="formatPlaceholder"
10869
+ [placeholder]="placeholder"
10870
+ [disabled]="disabled"
10871
+ [readonly]="readonly || readOnlyInput"
10872
+ [role]="inputRole"
10873
+ [ariaReadOnly]="readonly"
10874
+ [steps]="steps"
10875
+ [tabindex]="tabindex"
10876
+ [title]="title"
10877
+ [focusableId]="focusableId"
10878
+ [hasPopup]="true"
10879
+ [isPopupOpen]="isOpen"
10880
+ (valueChange)="handleInputValueChange($event)"
10881
+ [kendoEventsOutsideAngular]="{
10882
+ keydown: handleKeyDown
10883
+ }"
10884
+ [scope]="this"
10885
+ [fillMode]="fillMode"
10886
+ [rounded]="rounded"
10887
+ [size]="size"
10350
10888
  >
10351
- <kendo-dateinput
10352
- [value]="value"
10353
- [format]="format"
10354
- [twoDigitYearMax]="twoDigitYearMax"
10355
- [min]="min"
10356
- [max]="max"
10357
- [incompleteDateValidation]="incompleteDateValidation"
10358
- [formatPlaceholder]="formatPlaceholder"
10359
- [placeholder]="placeholder"
10360
- [disabled]="disabled"
10361
- [readonly]="readonly || readOnlyInput"
10362
- [role]="inputRole"
10363
- [ariaReadOnly]="readonly"
10364
- [steps]="steps"
10365
- [tabindex]="tabindex"
10366
- [title]="title"
10367
- [focusableId]="focusableId"
10368
- [hasPopup]="true"
10369
- [isPopupOpen]="isOpen"
10370
- (valueChange)="handleInputValueChange($event)"
10371
- [kendoEventsOutsideAngular]="{
10372
- keydown: handleKeyDown
10373
- }"
10374
- [scope]="this"
10375
- >
10376
- </kendo-dateinput>
10377
- <span class="k-select"
10378
- [attr.title]="localization.get('toggle')"
10379
- [attr.aria-label]="localization.get('toggle')"
10380
- [kendoEventsOutsideAngular]="{
10381
- mousedown: preventMouseDown,
10382
- click: handleIconClick
10889
+ </kendo-dateinput>
10890
+ <button
10891
+ #toggleButton
10892
+ type="button"
10893
+ class="k-input-button k-button k-icon-button"
10894
+ [tabindex]="-1"
10895
+ [attr.title]="localization.get('toggle')"
10896
+ [attr.aria-label]="localization.get('toggle')"
10897
+ [kendoEventsOutsideAngular]="{
10898
+ mousedown: preventMouseDown,
10899
+ click: handleIconClick
10900
+ }"
10901
+ [scope]="this"
10902
+ >
10903
+ <span class="k-button-icon k-icon"
10904
+ [ngClass]="{
10905
+ 'k-i-calendar': activeTab === 'date',
10906
+ 'k-i-clock': activeTab === 'time'
10383
10907
  }"
10384
- [scope]="this"
10385
- >
10386
- <span class="k-link k-link-date">
10387
- <span
10388
- class="k-icon"
10389
- [class.k-i-calendar]="activeTab === 'date'"
10390
- [class.k-i-clock]="activeTab === 'time'"
10391
- >
10392
- </span>
10393
- </span>
10394
- </span>
10395
- </span>
10908
+ ></span>
10909
+ </button>
10396
10910
 
10397
10911
  <ng-container #container></ng-container>
10398
10912
 
@@ -10415,8 +10929,9 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
10415
10929
  <div class="k-button-group k-button-group-stretched">
10416
10930
  <button
10417
10931
  type="button"
10418
- class="k-button k-date-tab"
10419
- [class.k-state-active]="activeTab === 'date'"
10932
+ class="k-button k-group-start k-date-tab"
10933
+ [ngClass]="popupButtonsClasses()"
10934
+ [class.k-active]="activeTab === 'date'"
10420
10935
  [attr.title]="localization.get('dateTabLabel')"
10421
10936
  [attr.aria-label]="localization.get('dateTabLabel')"
10422
10937
  [kendoEventsOutsideAngular]="{
@@ -10429,8 +10944,9 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
10429
10944
  </button>
10430
10945
  <button
10431
10946
  type="button"
10432
- class="k-button k-time-tab"
10433
- [class.k-state-active]="activeTab === 'time'"
10947
+ class="k-button k-group-end k-time-tab"
10948
+ [ngClass]="popupButtonsClasses()"
10949
+ [class.k-active]="activeTab === 'time'"
10434
10950
  [attr.title]="localization.get('timeTabLabel')"
10435
10951
  [attr.aria-label]="localization.get('timeTabLabel')"
10436
10952
  [kendoEventsOutsideAngular]="{
@@ -10510,6 +11026,7 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
10510
11026
  *ngIf="cancelButton"
10511
11027
  type="button"
10512
11028
  class="k-button k-time-cancel"
11029
+ [ngClass]="popupButtonsClasses()"
10513
11030
  [attr.title]="localization.get('cancelLabel')"
10514
11031
  [attr.aria-label]="localization.get('cancelLabel')"
10515
11032
  [kendoEventsOutsideAngular]="{
@@ -10521,7 +11038,8 @@ DateTimePickerComponent = DateTimePickerComponent_1 = __decorate([
10521
11038
  </button>
10522
11039
  <button
10523
11040
  type="button"
10524
- class="k-time-accept k-button k-primary"
11041
+ class="k-button k-time-accept"
11042
+ [ngClass]="popupButtonsClasses('primary')"
10525
11043
  [attr.title]="localization.get('acceptLabel')"
10526
11044
  [attr.aria-label]="localization.get('acceptLabel')"
10527
11045
  [disabled]="!calendarValue"
@@ -11264,7 +11782,7 @@ class DateRangeInput {
11264
11782
  const action = show ? 'addClass' : 'removeClass';
11265
11783
  const nativeElement = this.element.nativeElement;
11266
11784
  if (nativeElement && nativeElement.querySelector) {
11267
- this.renderer[action](nativeElement.querySelector('.k-dateinput-wrap'), 'k-state-focused');
11785
+ this.renderer[action](nativeElement, 'k-focus');
11268
11786
  }
11269
11787
  }
11270
11788
  }
@@ -11840,7 +12358,7 @@ let ViewComponent = class ViewComponent {
11840
12358
  'k-state-selected': !context.isOtherMonth && (context.isSelected || isRangeStart || isRangeEnd),
11841
12359
  'k-today': !context.isOtherMonth && context.isToday,
11842
12360
  'k-weekend': context.isWeekend,
11843
- 'k-state-disabled': context.isDisabled,
12361
+ 'k-disabled': context.isDisabled,
11844
12362
  'k-other-month': context.isOtherMonth
11845
12363
  });
11846
12364
  }
@@ -12269,7 +12787,14 @@ MultiViewCalendarModule = __decorate([
12269
12787
  CalendarCommonModule,
12270
12788
  TemplatesModule
12271
12789
  ],
12272
- imports: [CommonModule, CalendarCommonModule, IntlModule, TemplatesModule, PopupModule],
12790
+ imports: [
12791
+ CommonModule,
12792
+ CalendarCommonModule,
12793
+ IntlModule,
12794
+ TemplatesModule,
12795
+ PopupModule,
12796
+ EventsModule
12797
+ ],
12273
12798
  providers: [
12274
12799
  NavigationService,
12275
12800
  CenturyViewService,
@@ -12755,14 +13280,16 @@ DateRangeModule = __decorate([
12755
13280
  const div$1 = domContainerFactory('div');
12756
13281
  const ul$1 = domContainerFactory('ul');
12757
13282
  const li$1 = domContainerFactory('li');
13283
+ const span = domContainerFactory('span');
13284
+ const listTitle = () => span('hour', 'k-title k-timeselector-title');
12758
13285
  const listItem = () => li$1('<span>02</span>', 'k-item');
12759
13286
  const list = () => ul$1([listItem()], 'k-reset');
12760
- const scrollable$1 = () => (div$1([list()], 'k-time-container k-content k-scrollable'));
13287
+ const scrollable$1 = () => (div$1([list()], 'k-time-container k-flex k-content k-calendar-content k-scrollable'));
12761
13288
  const timeListWrapper = () => {
12762
13289
  if (!isDocumentAvailable()) {
12763
13290
  return null;
12764
13291
  }
12765
- return div$1([div$1([scrollable$1()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
13292
+ return div$1([listTitle(), div$1([scrollable$1()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
12766
13293
  };
12767
13294
  const TIMELIST_WRAPPER = timeListWrapper();
12768
13295
  /**
@@ -12782,7 +13309,8 @@ let TimePickerDOMService = class TimePickerDOMService {
12782
13309
  const listContainer = container && container.querySelector('.k-time-list-container');
12783
13310
  const hostContainer = listContainer || document.body;
12784
13311
  const wrapper = hostContainer.appendChild(TIMELIST_WRAPPER);
12785
- this.timeListHeight = wrapper.querySelector('.k-scrollable').getBoundingClientRect().height;
13312
+ this.timeListTitleHeight = wrapper.querySelector('.k-timeselector-title').getBoundingClientRect().height;
13313
+ this.timeListHeight = wrapper.getBoundingClientRect().height;
12786
13314
  this.itemHeight = wrapper.querySelector('li').getBoundingClientRect().height;
12787
13315
  hostContainer.removeChild(wrapper);
12788
13316
  }
@@ -13422,8 +13950,9 @@ let TimeListComponent = class TimeListComponent {
13422
13950
  this.dom.ensureHeights();
13423
13951
  this.itemHeight = this.dom.itemHeight;
13424
13952
  this.listHeight = this.dom.timeListHeight;
13425
- this.topOffset = (this.listHeight - this.itemHeight) / 2;
13426
- this.bottomOffset = this.listHeight - this.itemHeight;
13953
+ const titleHeight = this.dom.timeListTitleHeight;
13954
+ this.topOffset = (this.listHeight - this.itemHeight - titleHeight) / 2;
13955
+ this.bottomOffset = this.listHeight - this.itemHeight - titleHeight;
13427
13956
  this.topThreshold = this.itemHeight * SNAP_THRESHOLD;
13428
13957
  this.bottomThreshold = this.itemHeight * (1 - SNAP_THRESHOLD);
13429
13958
  const translate = `translateY(${this.topOffset}px)`;
@@ -13645,12 +14174,12 @@ TimeListComponent = __decorate([
13645
14174
  const isEqualTillMinute = (value, min) => value.getHours() === min.getHours() && value.getMinutes() === min.getMinutes();
13646
14175
  const isEqualTillSecond = (value, min) => isEqualTillMinute(value, min) && value.getSeconds() === min.getSeconds();
13647
14176
  const isEqualTillMillisecond = (value, min) => isEqualTillSecond(value, min) && value.getMilliseconds() === min.getMilliseconds();
13648
- const ɵ3$7 = (value) => value.getHours(), ɵ4$2 = (_, min) => min.getHours(), ɵ5$1 = (value) => value.getMinutes(), ɵ6$1 = (value, min) => isEqualTillMinute(value, min) ? min.getMinutes() : 0, ɵ7$1 = (value) => value.getSeconds(), ɵ8$1 = (value, min) => isEqualTillSecond(value, min) ? min.getSeconds() : 0, ɵ9$1 = (value) => value.getMilliseconds(), ɵ10$1 = (value, min) => isEqualTillMillisecond(value, min) ? min.getMilliseconds() : 0;
14177
+ const ɵ3$7 = (value) => value.getHours(), ɵ4$3 = (_, min) => min.getHours(), ɵ5$1 = (value) => value.getMinutes(), ɵ6$1 = (value, min) => isEqualTillMinute(value, min) ? min.getMinutes() : 0, ɵ7$1 = (value) => value.getSeconds(), ɵ8$1 = (value, min) => isEqualTillSecond(value, min) ? min.getSeconds() : 0, ɵ9$1 = (value) => value.getMilliseconds(), ɵ10$1 = (value, min) => isEqualTillMillisecond(value, min) ? min.getMilliseconds() : 0;
13649
14178
  const defaultGetters = [
13650
14179
  {
13651
14180
  type: TIME_PART.hour,
13652
14181
  getter: ɵ3$7,
13653
- minGetter: ɵ4$2
14182
+ minGetter: ɵ4$3
13654
14183
  }, {
13655
14184
  type: TIME_PART.minute,
13656
14185
  getter: ɵ5$1,
@@ -14084,7 +14613,7 @@ __decorate([
14084
14613
  __metadata("design:type", Boolean)
14085
14614
  ], TimeSelectorComponent.prototype, "componentClass", void 0);
14086
14615
  __decorate([
14087
- HostBinding('class.k-state-disabled'),
14616
+ HostBinding('class.k-disabled'),
14088
14617
  __metadata("design:type", Boolean),
14089
14618
  __metadata("design:paramtypes", [])
14090
14619
  ], TimeSelectorComponent.prototype, "disabledClass", null);
@@ -14173,7 +14702,8 @@ TimeSelectorComponent = __decorate([
14173
14702
  <button
14174
14703
  #now
14175
14704
  *ngIf="showNowButton"
14176
- class="k-button k-flat k-time-now" type="button"
14705
+ type="button"
14706
+ class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-time-now"
14177
14707
  [attr.title]="localization.get('nowLabel')"
14178
14708
  [attr.aria-label]="localization.get('nowLabel')"
14179
14709
  [kendoEventsOutsideAngular]="{
@@ -14215,11 +14745,12 @@ TimeSelectorComponent = __decorate([
14215
14745
  </div>
14216
14746
  </ng-template>
14217
14747
  </div>
14218
- <div class="k-time-footer k-action-buttons" *ngIf="setButton || cancelButton">
14748
+ <div class="k-time-footer k-action-buttons k-actions k-hstack k-justify-content-stretch" *ngIf="setButton || cancelButton">
14219
14749
  <button
14220
14750
  #cancel
14221
14751
  *ngIf="cancelButton"
14222
- class="k-button k-time-cancel" type="button"
14752
+ class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
14753
+ type="button"
14223
14754
  [attr.title]="localization.get('cancelLabel')"
14224
14755
  [attr.aria-label]="localization.get('cancelLabel')"
14225
14756
  [kendoEventsOutsideAngular]="{
@@ -14234,7 +14765,7 @@ TimeSelectorComponent = __decorate([
14234
14765
  #accept
14235
14766
  *ngIf="setButton"
14236
14767
  type="button"
14237
- class="k-time-accept k-button k-primary"
14768
+ class="k-button k-time-accept k-button-md k-rounded-md k-button-solid k-button-solid-primary"
14238
14769
  [attr.title]="localization.get('acceptLabel')"
14239
14770
  [attr.aria-label]="localization.get('acceptLabel')"
14240
14771
  [kendoEventsOutsideAngular]="{