@progress/kendo-angular-dateinputs 5.3.1-dev.202201070925 → 6.0.1-dev.202201310951

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 (73) 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 +4 -2
  7. package/dist/es/calendar/header.component.js +1 -1
  8. package/dist/es/calendar/multiview-calendar.component.js +1 -1
  9. package/dist/es/calendar/services/dom.service.js +1 -1
  10. package/dist/es/calendar/view.component.js +1 -1
  11. package/dist/es/common/models/fillmode.js +4 -0
  12. package/dist/es/common/models/rounded.js +4 -0
  13. package/dist/es/common/models/size.js +4 -0
  14. package/dist/es/dateinput/dateinput.component.js +143 -18
  15. package/dist/es/datepicker/datepicker.component.js +127 -13
  16. package/dist/es/daterange/date-range-input.js +1 -1
  17. package/dist/es/datetimepicker/datetimepicker.component.js +147 -11
  18. package/dist/es/package-metadata.js +1 -1
  19. package/dist/es/timepicker/services/dom.service.js +12 -8
  20. package/dist/es/timepicker/timelist.component.js +3 -2
  21. package/dist/es/timepicker/timepicker.component.js +130 -13
  22. package/dist/es/timepicker/timeselector.component.js +2 -2
  23. package/dist/es/util.js +37 -0
  24. package/dist/es2015/calendar/calendar.component.js +4 -2
  25. package/dist/es2015/calendar/header.component.js +4 -4
  26. package/dist/es2015/calendar/multiview-calendar.component.js +1 -1
  27. package/dist/es2015/calendar/services/dom.service.js +1 -1
  28. package/dist/es2015/calendar/view.component.js +1 -1
  29. package/dist/es2015/common/models/fillmode.d.ts +14 -0
  30. package/dist/es2015/common/models/fillmode.js +4 -0
  31. package/dist/es2015/common/models/rounded.d.ts +15 -0
  32. package/dist/es2015/common/models/rounded.js +4 -0
  33. package/dist/es2015/common/models/size.d.ts +14 -0
  34. package/dist/es2015/common/models/size.js +4 -0
  35. package/dist/es2015/dateinput/dateinput.component.d.ts +49 -8
  36. package/dist/es2015/dateinput/dateinput.component.js +183 -68
  37. package/dist/es2015/datepicker/datepicker.component.d.ts +47 -5
  38. package/dist/es2015/datepicker/datepicker.component.js +152 -49
  39. package/dist/es2015/daterange/date-range-input.js +1 -1
  40. package/dist/es2015/datetimepicker/datetimepicker.component.d.ts +56 -6
  41. package/dist/es2015/datetimepicker/datetimepicker.component.js +186 -63
  42. package/dist/es2015/index.metadata.json +1 -1
  43. package/dist/es2015/package-metadata.js +1 -1
  44. package/dist/es2015/timepicker/services/dom.service.d.ts +1 -0
  45. package/dist/es2015/timepicker/services/dom.service.js +12 -8
  46. package/dist/es2015/timepicker/timelist.component.js +3 -2
  47. package/dist/es2015/timepicker/timepicker.component.d.ts +50 -5
  48. package/dist/es2015/timepicker/timepicker.component.js +174 -69
  49. package/dist/es2015/timepicker/timeselector.component.js +7 -5
  50. package/dist/es2015/util.d.ts +18 -0
  51. package/dist/es2015/util.js +37 -0
  52. package/dist/fesm2015/index.js +759 -268
  53. package/dist/fesm5/index.js +603 -68
  54. package/dist/npm/calendar/calendar.component.js +4 -2
  55. package/dist/npm/calendar/header.component.js +1 -1
  56. package/dist/npm/calendar/multiview-calendar.component.js +1 -1
  57. package/dist/npm/calendar/services/dom.service.js +1 -1
  58. package/dist/npm/calendar/view.component.js +1 -1
  59. package/dist/npm/common/models/fillmode.js +6 -0
  60. package/dist/npm/common/models/rounded.js +6 -0
  61. package/dist/npm/common/models/size.js +6 -0
  62. package/dist/npm/dateinput/dateinput.component.js +142 -17
  63. package/dist/npm/datepicker/datepicker.component.js +126 -12
  64. package/dist/npm/daterange/date-range-input.js +1 -1
  65. package/dist/npm/datetimepicker/datetimepicker.component.js +146 -10
  66. package/dist/npm/package-metadata.js +1 -1
  67. package/dist/npm/timepicker/services/dom.service.js +15 -10
  68. package/dist/npm/timepicker/timelist.component.js +3 -2
  69. package/dist/npm/timepicker/timepicker.component.js +129 -12
  70. package/dist/npm/timepicker/timeselector.component.js +2 -2
  71. package/dist/npm/util.js +37 -0
  72. package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
  73. package/package.json +7 -7
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-dateinputs',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1641547209,
12
+ publishDate: 1643622478,
13
13
  version: '',
14
14
  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'
15
15
  };
@@ -9,6 +9,7 @@ import { ElementRef } from '@angular/core';
9
9
  export declare class TimePickerDOMService {
10
10
  itemHeight: number;
11
11
  timeListHeight: number;
12
+ timeListTitleHeight: number;
12
13
  ensureHeights(): void;
13
14
  calculateHeights(container?: HTMLElement): void;
14
15
  isActive(element: ElementRef): boolean;
@@ -9,19 +9,22 @@ import { domContainerFactory as containerFactory } from '../../util';
9
9
  const div = containerFactory('div');
10
10
  const ul = containerFactory('ul');
11
11
  const li = containerFactory('li');
12
+ const span = containerFactory('span');
13
+ const listTitle = () => span('hour', 'k-title k-timeselector-title');
14
+ const ɵ0 = listTitle;
12
15
  const listItem = () => li('<span>02</span>', 'k-item');
13
- const ɵ0 = listItem;
16
+ const ɵ1 = listItem;
14
17
  const list = () => ul([listItem()], 'k-reset');
15
- const ɵ1 = list;
16
- const scrollable = () => (div([list()], 'k-time-container k-content k-scrollable'));
17
- const ɵ2 = scrollable;
18
+ const ɵ2 = list;
19
+ const scrollable = () => (div([list()], 'k-time-container k-flex k-content k-calendar-content k-scrollable'));
20
+ const ɵ3 = scrollable;
18
21
  const timeListWrapper = () => {
19
22
  if (!isDocumentAvailable()) {
20
23
  return null;
21
24
  }
22
- return div([div([scrollable()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
25
+ return div([listTitle(), div([scrollable()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
23
26
  };
24
- const ɵ3 = timeListWrapper;
27
+ const ɵ4 = timeListWrapper;
25
28
  const TIMELIST_WRAPPER = timeListWrapper();
26
29
  /**
27
30
  * @hidden
@@ -40,7 +43,8 @@ let TimePickerDOMService = class TimePickerDOMService {
40
43
  const listContainer = container && container.querySelector('.k-time-list-container');
41
44
  const hostContainer = listContainer || document.body;
42
45
  const wrapper = hostContainer.appendChild(TIMELIST_WRAPPER);
43
- this.timeListHeight = wrapper.querySelector('.k-scrollable').getBoundingClientRect().height;
46
+ this.timeListTitleHeight = wrapper.querySelector('.k-timeselector-title').getBoundingClientRect().height;
47
+ this.timeListHeight = wrapper.getBoundingClientRect().height;
44
48
  this.itemHeight = wrapper.querySelector('li').getBoundingClientRect().height;
45
49
  hostContainer.removeChild(wrapper);
46
50
  }
@@ -55,4 +59,4 @@ TimePickerDOMService = tslib_1.__decorate([
55
59
  Injectable()
56
60
  ], TimePickerDOMService);
57
61
  export { TimePickerDOMService };
58
- export { ɵ0, ɵ1, ɵ2, ɵ3 };
62
+ export { ɵ0, ɵ1, ɵ2, ɵ3, ɵ4 };
@@ -87,8 +87,9 @@ let TimeListComponent = class TimeListComponent {
87
87
  this.dom.ensureHeights();
88
88
  this.itemHeight = this.dom.itemHeight;
89
89
  this.listHeight = this.dom.timeListHeight;
90
- this.topOffset = (this.listHeight - this.itemHeight) / 2;
91
- this.bottomOffset = this.listHeight - this.itemHeight;
90
+ const titleHeight = this.dom.timeListTitleHeight;
91
+ this.topOffset = (this.listHeight - this.itemHeight - titleHeight) / 2;
92
+ this.bottomOffset = this.listHeight - this.itemHeight - titleHeight;
92
93
  this.topThreshold = this.itemHeight * SNAP_THRESHOLD;
93
94
  this.bottomThreshold = this.itemHeight * (1 - SNAP_THRESHOLD);
94
95
  const translate = `translateY(${this.topOffset}px)`;
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, TemplateRef, ViewContainerRef, OnInit, OnChanges, OnDestroy, Renderer2, Injector } from '@angular/core';
5
+ import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, TemplateRef, ViewContainerRef, OnInit, OnChanges, OnDestroy, Renderer2, Injector, AfterViewInit } from '@angular/core';
6
6
  import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
7
7
  import { LocalizationService } from '@progress/kendo-angular-l10n';
8
8
  import { PopupService, PopupRef } from '@progress/kendo-angular-popup';
@@ -14,15 +14,18 @@ import { TimeSelectorComponent } from './timeselector.component';
14
14
  import { DateInputComponent } from '../dateinput/dateinput.component';
15
15
  import { PopupSettings } from '../popup-settings.model';
16
16
  import { PreventableEvent } from '../preventable-event';
17
+ import { DateInputSize } from '../common/models/size';
18
+ import { DateInputRounded } from '../common/models/rounded';
19
+ import { DateInputFillMode } from '../common/models/fillmode';
17
20
  /**
18
21
  * Represents the [Kendo UI TimePicker component for Angular]({% slug overview_timepicker %}#toc-basic-usage).
19
22
  */
20
- export declare class TimePickerComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy, Validator {
23
+ export declare class TimePickerComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges, OnDestroy, Validator {
21
24
  zone: NgZone;
22
25
  localization: LocalizationService;
23
26
  private cdr;
24
27
  private popupService;
25
- private element;
28
+ wrapper: ElementRef;
26
29
  private renderer;
27
30
  private injector;
28
31
  private pickerService;
@@ -30,7 +33,7 @@ export declare class TimePickerComponent implements ControlValueAccessor, OnInit
30
33
  private touchEnabled;
31
34
  container: ViewContainerRef;
32
35
  popupTemplate: TemplateRef<any>;
33
- wrapper: ElementRef;
36
+ toggleButton: ElementRef;
34
37
  /**
35
38
  * @hidden
36
39
  */
@@ -195,6 +198,40 @@ export declare class TimePickerComponent implements ControlValueAccessor, OnInit
195
198
  * Specifies the value of the TimePicker component.
196
199
  */
197
200
  value: Date;
201
+ /**
202
+ * Sets the size of the component.
203
+ *
204
+ * The possible values are:
205
+ * * `'small'`
206
+ * * `'medium'` (Default)
207
+ * * `'large'`
208
+ * * `null`
209
+ *
210
+ */
211
+ size: DateInputSize;
212
+ /**
213
+ * Sets the border radius of the component.
214
+ *
215
+ * The possible values are:
216
+ * * `'small'`
217
+ * * `'medium'` (Default)
218
+ * * `'large'`
219
+ * * `'full'`
220
+ * * `null`
221
+ *
222
+ */
223
+ rounded: DateInputRounded;
224
+ /**
225
+ * Sets the fillMode of the component.
226
+ *
227
+ * The possible values are:
228
+ * * `'solid'` (Default)
229
+ * * `'flat'`
230
+ * * `'outline'`
231
+ * * `null`
232
+ *
233
+ */
234
+ fillMode: DateInputFillMode;
198
235
  /**
199
236
  * Fires each time the user selects a new value.
200
237
  * For more information, refer to the section on
@@ -297,7 +334,10 @@ export declare class TimePickerComponent implements ControlValueAccessor, OnInit
297
334
  private windowBlurSubscription;
298
335
  private control;
299
336
  private domEvents;
300
- constructor(zone: NgZone, localization: LocalizationService, cdr: ChangeDetectorRef, popupService: PopupService, element: ElementRef, renderer: Renderer2, injector: Injector, pickerService: PickerService, intl: IntlService, touchEnabled: boolean);
337
+ private _size;
338
+ private _rounded;
339
+ private _fillMode;
340
+ constructor(zone: NgZone, localization: LocalizationService, cdr: ChangeDetectorRef, popupService: PopupService, wrapper: ElementRef, renderer: Renderer2, injector: Injector, pickerService: PickerService, intl: IntlService, touchEnabled: boolean);
301
341
  /**
302
342
  * @hidden
303
343
  * Used by the TextBoxContainer to determine if the component is empty
@@ -307,6 +347,10 @@ export declare class TimePickerComponent implements ControlValueAccessor, OnInit
307
347
  * @hidden
308
348
  */
309
349
  ngOnInit(): void;
350
+ /**
351
+ * @hidden
352
+ */
353
+ ngAfterViewInit(): void;
310
354
  /**
311
355
  * @hidden
312
356
  */
@@ -424,4 +468,5 @@ export declare class TimePickerComponent implements ControlValueAccessor, OnInit
424
468
  private handleBlur;
425
469
  private blurComponent;
426
470
  private handleDateCompletenessChange;
471
+ private setComponentClasses;
427
472
  }
@@ -18,7 +18,7 @@ import { PickerService } from '../common/picker.service';
18
18
  import { requiresZoneOnBlur, currentFocusTarget } from '../common/utils';
19
19
  import { TIME_PART } from './models/time-part.default';
20
20
  import { PreventableEvent } from '../preventable-event';
21
- import { noop, setTime, isWindowAvailable } from '../util';
21
+ import { noop, setTime, isWindowAvailable, getFillModeClass, getSizeClass, getRoundedClass } from '../util';
22
22
  import { timeRangeValidator } from '../validators/time-range.validator';
23
23
  import { TOUCH_ENABLED } from '../touch-enabled';
24
24
  import { fromEvent } from 'rxjs';
@@ -30,12 +30,12 @@ const formatRegExp = new RegExp(`${TIME_PART.hour}|${TIME_PART.minute}|${TIME_PA
30
30
  * Represents the [Kendo UI TimePicker component for Angular]({% slug overview_timepicker %}#toc-basic-usage).
31
31
  */
32
32
  let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
33
- constructor(zone, localization, cdr, popupService, element, renderer, injector, pickerService, intl, touchEnabled) {
33
+ constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, intl, touchEnabled) {
34
34
  this.zone = zone;
35
35
  this.localization = localization;
36
36
  this.cdr = cdr;
37
37
  this.popupService = popupService;
38
- this.element = element;
38
+ this.wrapper = wrapper;
39
39
  this.renderer = renderer;
40
40
  this.injector = injector;
41
41
  this.pickerService = pickerService;
@@ -197,6 +197,9 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
197
197
  this._value = null;
198
198
  this._active = false;
199
199
  this.domEvents = [];
200
+ this._size = 'medium';
201
+ this._rounded = 'medium';
202
+ this._fillMode = 'solid';
200
203
  validatePackage(packageMetadata);
201
204
  this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
202
205
  this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
@@ -282,6 +285,73 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
282
285
  get value() {
283
286
  return this._value;
284
287
  }
288
+ /**
289
+ * Sets the size of the component.
290
+ *
291
+ * The possible values are:
292
+ * * `'small'`
293
+ * * `'medium'` (Default)
294
+ * * `'large'`
295
+ * * `null`
296
+ *
297
+ */
298
+ set size(size) {
299
+ this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
300
+ this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
301
+ if (size) {
302
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
303
+ this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
304
+ }
305
+ this._size = size;
306
+ }
307
+ get size() {
308
+ return this._size;
309
+ }
310
+ /**
311
+ * Sets the border radius of the component.
312
+ *
313
+ * The possible values are:
314
+ * * `'small'`
315
+ * * `'medium'` (Default)
316
+ * * `'large'`
317
+ * * `'full'`
318
+ * * `null`
319
+ *
320
+ */
321
+ set rounded(rounded) {
322
+ this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
323
+ if (rounded) {
324
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
325
+ }
326
+ this._rounded = rounded;
327
+ }
328
+ get rounded() {
329
+ return this._rounded;
330
+ }
331
+ /**
332
+ * Sets the fillMode of the component.
333
+ *
334
+ * The possible values are:
335
+ * * `'solid'` (Default)
336
+ * * `'flat'`
337
+ * * `'outline'`
338
+ * * `null`
339
+ *
340
+ */
341
+ set fillMode(fillMode) {
342
+ this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
343
+ this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
344
+ this.renderer.removeClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
345
+ if (fillMode) {
346
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
347
+ this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
348
+ this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${fillMode}-base`);
349
+ }
350
+ this._fillMode = fillMode;
351
+ }
352
+ get fillMode() {
353
+ return this._fillMode;
354
+ }
285
355
  /**
286
356
  * @hidden
287
357
  */
@@ -304,10 +374,10 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
304
374
  }
305
375
  const element = this.wrapper.nativeElement;
306
376
  if (value) {
307
- this.renderer.addClass(element, 'k-state-focused');
377
+ this.renderer.addClass(element, 'k-focus');
308
378
  }
309
379
  else {
310
- this.renderer.removeClass(element, 'k-state-focused');
380
+ this.renderer.removeClass(element, 'k-focus');
311
381
  }
312
382
  }
313
383
  get show() {
@@ -347,13 +417,19 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
347
417
  this.localizationChangeSubscription = this.localization
348
418
  .changes.subscribe(() => this.cdr.markForCheck());
349
419
  this.control = this.injector.get(NgControl, null);
350
- if (this.element) {
351
- this.renderer.removeAttribute(this.element.nativeElement, 'tabindex');
420
+ if (this.wrapper) {
421
+ this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
352
422
  this.zone.runOutsideAngular(() => {
353
423
  this.bindEvents();
354
424
  });
355
425
  }
356
426
  }
427
+ /**
428
+ * @hidden
429
+ */
430
+ ngAfterViewInit() {
431
+ this.setComponentClasses();
432
+ }
357
433
  /**
358
434
  * @hidden
359
435
  */
@@ -651,7 +727,7 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
651
727
  }
652
728
  }
653
729
  bindEvents() {
654
- const element = this.element.nativeElement;
730
+ const element = this.wrapper.nativeElement;
655
731
  this.domEvents.push(this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
656
732
  if (isWindowAvailable()) {
657
733
  this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this));
@@ -700,6 +776,20 @@ let TimePickerComponent = TimePickerComponent_1 = class TimePickerComponent {
700
776
  this.cdr.markForCheck();
701
777
  this.zone.run(() => this.onValidatorChange());
702
778
  }
779
+ setComponentClasses() {
780
+ if (this.size) {
781
+ this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
782
+ this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
783
+ }
784
+ if (this.rounded) {
785
+ this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
786
+ }
787
+ if (this.fillMode) {
788
+ this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
789
+ this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
790
+ this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
791
+ }
792
+ }
703
793
  };
704
794
  tslib_1.__decorate([
705
795
  ViewChild('container', { read: ViewContainerRef, static: false }),
@@ -710,9 +800,9 @@ tslib_1.__decorate([
710
800
  tslib_1.__metadata("design:type", TemplateRef)
711
801
  ], TimePickerComponent.prototype, "popupTemplate", void 0);
712
802
  tslib_1.__decorate([
713
- ViewChild('wrapper', { static: false }),
803
+ ViewChild('toggleButton', { static: true }),
714
804
  tslib_1.__metadata("design:type", ElementRef)
715
- ], TimePickerComponent.prototype, "wrapper", void 0);
805
+ ], TimePickerComponent.prototype, "toggleButton", void 0);
716
806
  tslib_1.__decorate([
717
807
  Input(),
718
808
  tslib_1.__metadata("design:type", String)
@@ -795,6 +885,21 @@ tslib_1.__decorate([
795
885
  tslib_1.__metadata("design:type", Date),
796
886
  tslib_1.__metadata("design:paramtypes", [Date])
797
887
  ], TimePickerComponent.prototype, "value", null);
888
+ tslib_1.__decorate([
889
+ Input(),
890
+ tslib_1.__metadata("design:type", String),
891
+ tslib_1.__metadata("design:paramtypes", [String])
892
+ ], TimePickerComponent.prototype, "size", null);
893
+ tslib_1.__decorate([
894
+ Input(),
895
+ tslib_1.__metadata("design:type", String),
896
+ tslib_1.__metadata("design:paramtypes", [String])
897
+ ], TimePickerComponent.prototype, "rounded", null);
898
+ tslib_1.__decorate([
899
+ Input(),
900
+ tslib_1.__metadata("design:type", String),
901
+ tslib_1.__metadata("design:paramtypes", [String])
902
+ ], TimePickerComponent.prototype, "fillMode", null);
798
903
  tslib_1.__decorate([
799
904
  Output(),
800
905
  tslib_1.__metadata("design:type", EventEmitter)
@@ -816,12 +921,12 @@ tslib_1.__decorate([
816
921
  tslib_1.__metadata("design:type", EventEmitter)
817
922
  ], TimePickerComponent.prototype, "close", void 0);
818
923
  tslib_1.__decorate([
819
- HostBinding('class.k-widget'),
820
924
  HostBinding('class.k-timepicker'),
925
+ HostBinding('class.k-input'),
821
926
  tslib_1.__metadata("design:type", Boolean)
822
927
  ], TimePickerComponent.prototype, "wrapperClasses", void 0);
823
928
  tslib_1.__decorate([
824
- HostBinding('class.k-state-disabled'),
929
+ HostBinding('class.k-disabled'),
825
930
  tslib_1.__metadata("design:type", Boolean),
826
931
  tslib_1.__metadata("design:paramtypes", [])
827
932
  ], TimePickerComponent.prototype, "disabledClass", null);
@@ -865,73 +970,73 @@ TimePickerComponent = TimePickerComponent_1 = tslib_1.__decorate([
865
970
  toggle="Toggle time list"
866
971
  >
867
972
  </ng-container>
868
- <span #wrapper
869
- class="k-picker-wrap"
870
- [class.k-state-disabled]="disabled"
973
+ <kendo-dateinput
974
+ #input
975
+ [focusableId]="focusableId"
976
+ [hasPopup]="true"
977
+ [isPopupOpen]="show"
978
+ [disabled]="disabled"
979
+ [readonly]="readonly || readOnlyInput"
980
+ [role]="inputRole"
981
+ [ariaReadOnly]="readonly"
982
+ [format]="format"
983
+ [formatPlaceholder]="formatPlaceholder"
984
+ [placeholder]="placeholder"
985
+ [min]="normalizeTime(min)"
986
+ [max]="normalizeTime(max)"
987
+ [incompleteDateValidation]="incompleteDateValidation"
988
+ [fillMode]="fillMode"
989
+ [rounded]="rounded"
990
+ [size]="size"
991
+ [steps]="steps"
992
+ [tabindex]="!show ? tabindex : -1"
993
+ [title]="title"
994
+ [value]="value"
995
+ (valueChange)="handleInputChange($event)"
996
+ ></kendo-dateinput>
997
+ <button
998
+ #toggleButton
999
+ type="button"
1000
+ class="k-input-button k-button k-icon-button"
1001
+ [attr.title]="localization.get('toggle')"
1002
+ [attr.aria-label]="localization.get('toggle')"
1003
+ [kendoEventsOutsideAngular]="{
1004
+ click: handleIconClick,
1005
+ mousedown: handleMousedown
1006
+ }"
1007
+ [scope]="this"
871
1008
  >
872
- <kendo-dateinput
873
- #input
874
- [focusableId]="focusableId"
875
- [hasPopup]="true"
876
- [isPopupOpen]="show"
877
- [disabled]="disabled"
878
- [readonly]="readonly || readOnlyInput"
879
- [role]="inputRole"
880
- [ariaReadOnly]="readonly"
1009
+ <span class="k-button-icon k-icon k-i-clock"></span>
1010
+ </button>
1011
+ <ng-template #popupTemplate>
1012
+ <kendo-timeselector
1013
+ #timeSelector
1014
+ [cancelButton]="cancelButton"
1015
+ [nowButton]="nowButton"
881
1016
  [format]="format"
882
- [formatPlaceholder]="formatPlaceholder"
883
- [placeholder]="placeholder"
884
- [min]="normalizeTime(min)"
885
- [max]="normalizeTime(max)"
886
- [incompleteDateValidation]="incompleteDateValidation"
1017
+ [min]="min"
1018
+ [max]="max"
887
1019
  [steps]="steps"
888
- [tabindex]="!show ? tabindex : -1"
889
- [title]="title"
890
1020
  [value]="value"
891
- (valueChange)="handleInputChange($event)"
892
- ></kendo-dateinput>
893
- <span class="k-select"
894
- role="button"
895
- [attr.title]="localization.get('toggle')"
896
- [attr.aria-label]="localization.get('toggle')"
897
1021
  [kendoEventsOutsideAngular]="{
898
- click: handleIconClick,
1022
+ keydown: handleKeydown,
899
1023
  mousedown: handleMousedown
900
1024
  }"
901
1025
  [scope]="this"
1026
+ (valueChange)="handleChange($event)"
1027
+ (valueReject)="handleReject()"
902
1028
  >
903
- <span class="k-icon k-i-clock"></span>
904
- </span>
905
- <ng-template #popupTemplate>
906
- <kendo-timeselector
907
- #timeSelector
908
- [cancelButton]="cancelButton"
909
- [nowButton]="nowButton"
910
- [format]="format"
911
- [min]="min"
912
- [max]="max"
913
- [steps]="steps"
914
- [value]="value"
915
- [kendoEventsOutsideAngular]="{
916
- keydown: handleKeydown,
917
- mousedown: handleMousedown
918
- }"
919
- [scope]="this"
920
- (valueChange)="handleChange($event)"
921
- (valueReject)="handleReject()"
1029
+ <kendo-timeselector-messages
1030
+ [acceptLabel]="localization.get('acceptLabel')"
1031
+ [accept]="localization.get('accept')"
1032
+ [cancelLabel]="localization.get('cancelLabel')"
1033
+ [cancel]="localization.get('cancel')"
1034
+ [nowLabel]="localization.get('nowLabel')"
1035
+ [now]="localization.get('now')"
922
1036
  >
923
- <kendo-timeselector-messages
924
- [acceptLabel]="localization.get('acceptLabel')"
925
- [accept]="localization.get('accept')"
926
- [cancelLabel]="localization.get('cancelLabel')"
927
- [cancel]="localization.get('cancel')"
928
- [nowLabel]="localization.get('nowLabel')"
929
- [now]="localization.get('now')"
930
- >
931
- </kendo-timeselector-messages>
932
- </kendo-timeselector>
933
- </ng-template>
934
- </span>
1037
+ </kendo-timeselector-messages>
1038
+ </kendo-timeselector>
1039
+ </ng-template>
935
1040
  <ng-container #container></ng-container>
936
1041
  `
937
1042
  }),
@@ -393,7 +393,7 @@ tslib_1.__decorate([
393
393
  tslib_1.__metadata("design:type", Boolean)
394
394
  ], TimeSelectorComponent.prototype, "componentClass", void 0);
395
395
  tslib_1.__decorate([
396
- HostBinding('class.k-state-disabled'),
396
+ HostBinding('class.k-disabled'),
397
397
  tslib_1.__metadata("design:type", Boolean),
398
398
  tslib_1.__metadata("design:paramtypes", [])
399
399
  ], TimeSelectorComponent.prototype, "disabledClass", null);
@@ -482,7 +482,8 @@ TimeSelectorComponent = tslib_1.__decorate([
482
482
  <button
483
483
  #now
484
484
  *ngIf="showNowButton"
485
- class="k-button k-flat k-time-now" type="button"
485
+ type="button"
486
+ class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-time-now"
486
487
  [attr.title]="localization.get('nowLabel')"
487
488
  [attr.aria-label]="localization.get('nowLabel')"
488
489
  [kendoEventsOutsideAngular]="{
@@ -524,11 +525,12 @@ TimeSelectorComponent = tslib_1.__decorate([
524
525
  </div>
525
526
  </ng-template>
526
527
  </div>
527
- <div class="k-time-footer k-action-buttons" *ngIf="setButton || cancelButton">
528
+ <div class="k-time-footer k-action-buttons k-actions k-hstack k-justify-content-stretch" *ngIf="setButton || cancelButton">
528
529
  <button
529
530
  #cancel
530
531
  *ngIf="cancelButton"
531
- class="k-button k-time-cancel" type="button"
532
+ class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
533
+ type="button"
532
534
  [attr.title]="localization.get('cancelLabel')"
533
535
  [attr.aria-label]="localization.get('cancelLabel')"
534
536
  [kendoEventsOutsideAngular]="{
@@ -543,7 +545,7 @@ TimeSelectorComponent = tslib_1.__decorate([
543
545
  #accept
544
546
  *ngIf="setButton"
545
547
  type="button"
546
- class="k-time-accept k-button k-primary"
548
+ class="k-button k-time-accept k-button-md k-rounded-md k-button-solid k-button-solid-primary"
547
549
  [attr.title]="localization.get('acceptLabel')"
548
550
  [attr.aria-label]="localization.get('acceptLabel')"
549
551
  [kendoEventsOutsideAngular]="{
@@ -4,6 +4,9 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { SelectionRange } from './calendar/models/selection-range.interface';
6
6
  import { CalendarType } from './calendar/models/type';
7
+ import { DateInputSize } from './common/models/size';
8
+ import { DateInputRounded } from './common/models/rounded';
9
+ import { DateInputFillMode } from './common/models/fillmode';
7
10
  /**
8
11
  * @hidden
9
12
  */
@@ -167,3 +170,18 @@ export declare const millisecondStepFor: (digits: number) => number;
167
170
  * Checks if a tab keydown would would move the focus outside of the calendar.
168
171
  */
169
172
  export declare const isTabExitingCalendar: (calendarType: CalendarType, focusedElement: Element, shiftKey: boolean) => boolean;
173
+ /**
174
+ * @hidden
175
+ * Returns the size class based on the component and size input.
176
+ */
177
+ export declare const getSizeClass: (component: string, size: DateInputSize) => string;
178
+ /**
179
+ * @hidden
180
+ * Returns the rounded class based on the rounded input.
181
+ */
182
+ export declare const getRoundedClass: (rounded: DateInputRounded) => string;
183
+ /**
184
+ * @hidden
185
+ * Return the fillMode class based on the component and fillMode input.
186
+ */
187
+ export declare const getFillModeClass: (component: string, fillMode: DateInputFillMode) => string;
@@ -349,4 +349,41 @@ export const isTabExitingCalendar = (calendarType, focusedElement, shiftKey) =>
349
349
  (!shiftKey && focusedElement.classList.contains('k-next-view')) // exited on next button focused and regular tab
350
350
  );
351
351
  };
352
+ /**
353
+ * @hidden
354
+ * Returns the size class based on the component and size input.
355
+ */
356
+ export const getSizeClass = (component, size) => {
357
+ const SIZE_CLASSES = {
358
+ 'small': `k-${component}-sm`,
359
+ 'medium': `k-${component}-md`,
360
+ 'large': `k-${component}-lg`
361
+ };
362
+ return SIZE_CLASSES[size];
363
+ };
364
+ /**
365
+ * @hidden
366
+ * Returns the rounded class based on the rounded input.
367
+ */
368
+ export const getRoundedClass = (rounded) => {
369
+ const ROUNDED_CLASSES = {
370
+ 'small': 'k-rounded-sm',
371
+ 'medium': 'k-rounded-md',
372
+ 'large': 'k-rounded-lg',
373
+ 'full': 'k-rounded-full'
374
+ };
375
+ return ROUNDED_CLASSES[rounded];
376
+ };
377
+ /**
378
+ * @hidden
379
+ * Return the fillMode class based on the component and fillMode input.
380
+ */
381
+ export const getFillModeClass = (component, fillMode) => {
382
+ const FILLMODE_CLASSES = {
383
+ 'solid': `k-${component}-solid`,
384
+ 'flat': `k-${component}-flat`,
385
+ 'outline': `k-${component}-outline`
386
+ };
387
+ return FILLMODE_CLASSES[fillMode];
388
+ };
352
389
  export { ɵ0, ɵ1, ɵ2 };