@progress/kendo-angular-inputs 8.0.0-dev.202112161434 → 8.0.0-dev.202201121416

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 (115) hide show
  1. package/dist/cdn/js/kendo-angular-inputs.js +2 -2
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/checkbox/checkbox.directive.js +79 -3
  4. package/dist/es/colorpicker/color-gradient.component.js +4 -1
  5. package/dist/es/colorpicker/color-input.component.js +1 -1
  6. package/dist/es/colorpicker/color-palette.component.js +6 -3
  7. package/dist/es/colorpicker/colorpicker.component.js +316 -53
  8. package/dist/es/colorpicker/flatcolorpicker-actions.component.js +1 -1
  9. package/dist/es/colorpicker/flatcolorpicker-header.component.js +1 -1
  10. package/dist/es/colorpicker/flatcolorpicker.component.js +7 -4
  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/common/models/styling-classes.js +4 -0
  15. package/dist/es/common/models.js +4 -0
  16. package/dist/es/common/utils.js +37 -0
  17. package/dist/es/main.js +0 -1
  18. package/dist/es/maskedtextbox/maskedtextbox.component.js +101 -6
  19. package/dist/es/numerictextbox/numerictextbox.component.js +116 -20
  20. package/dist/es/package-metadata.js +1 -1
  21. package/dist/es/radiobutton/radiobutton.directive.js +55 -3
  22. package/dist/es/shared/textarea.directive.js +3 -2
  23. package/dist/es/slider/slider.component.js +1 -1
  24. package/dist/es/switch/switch.component.js +167 -21
  25. package/dist/es/text-fields-common/text-fields-base.js +1 -1
  26. package/dist/es/textarea/textarea.component.js +101 -5
  27. package/dist/es/textbox/textbox.component.js +108 -11
  28. package/dist/es/textbox/textbox.directive.js +3 -2
  29. package/dist/es/textbox.module.js +0 -3
  30. package/dist/es2015/checkbox/checkbox.directive.d.ts +31 -0
  31. package/dist/es2015/checkbox/checkbox.directive.js +68 -10
  32. package/dist/es2015/colorpicker/color-gradient.component.js +4 -1
  33. package/dist/es2015/colorpicker/color-input.component.js +2 -2
  34. package/dist/es2015/colorpicker/color-palette.component.d.ts +1 -1
  35. package/dist/es2015/colorpicker/color-palette.component.js +6 -3
  36. package/dist/es2015/colorpicker/colorpicker.component.d.ts +67 -9
  37. package/dist/es2015/colorpicker/colorpicker.component.js +285 -76
  38. package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +2 -2
  39. package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +2 -2
  40. package/dist/es2015/colorpicker/flatcolorpicker.component.d.ts +2 -2
  41. package/dist/es2015/colorpicker/flatcolorpicker.component.js +7 -4
  42. package/dist/es2015/common/models/fillmode.d.ts +13 -0
  43. package/dist/es2015/common/models/fillmode.js +4 -0
  44. package/dist/es2015/common/models/rounded.d.ts +23 -0
  45. package/dist/es2015/common/models/rounded.js +4 -0
  46. package/dist/es2015/common/models/size.d.ts +14 -0
  47. package/dist/es2015/common/models/size.js +4 -0
  48. package/dist/es2015/common/models/styling-classes.d.ts +11 -0
  49. package/dist/es2015/common/models/styling-classes.js +4 -0
  50. package/dist/es2015/common/models.d.ts +8 -0
  51. package/dist/es2015/common/models.js +4 -0
  52. package/dist/es2015/common/utils.d.ts +7 -0
  53. package/dist/es2015/common/utils.js +37 -0
  54. package/dist/es2015/index.metadata.json +1 -1
  55. package/dist/es2015/main.d.ts +1 -1
  56. package/dist/es2015/main.js +0 -1
  57. package/dist/es2015/maskedtextbox/maskedtextbox.component.d.ts +39 -1
  58. package/dist/es2015/maskedtextbox/maskedtextbox.component.js +88 -6
  59. package/dist/es2015/numerictextbox/numerictextbox.component.d.ts +39 -2
  60. package/dist/es2015/numerictextbox/numerictextbox.component.js +124 -40
  61. package/dist/es2015/package-metadata.js +1 -1
  62. package/dist/es2015/radiobutton/radiobutton.directive.d.ts +18 -0
  63. package/dist/es2015/radiobutton/radiobutton.directive.js +49 -11
  64. package/dist/es2015/shared/textarea.directive.d.ts +1 -1
  65. package/dist/es2015/shared/textarea.directive.js +3 -2
  66. package/dist/es2015/slider/slider.component.js +18 -23
  67. package/dist/es2015/switch/switch.component.d.ts +48 -5
  68. package/dist/es2015/switch/switch.component.js +166 -24
  69. package/dist/es2015/text-fields-common/text-fields-base.js +1 -1
  70. package/dist/es2015/textarea/textarea.component.d.ts +39 -1
  71. package/dist/es2015/textarea/textarea.component.js +89 -5
  72. package/dist/es2015/textbox/textbox.component.d.ts +40 -1
  73. package/dist/es2015/textbox/textbox.component.js +114 -30
  74. package/dist/es2015/textbox/textbox.directive.d.ts +1 -1
  75. package/dist/es2015/textbox/textbox.directive.js +3 -2
  76. package/dist/es2015/textbox.module.js +0 -3
  77. package/dist/fesm2015/index.js +1220 -654
  78. package/dist/fesm5/index.js +1276 -585
  79. package/dist/npm/checkbox/checkbox.directive.js +78 -2
  80. package/dist/npm/colorpicker/color-gradient.component.js +4 -1
  81. package/dist/npm/colorpicker/color-input.component.js +1 -1
  82. package/dist/npm/colorpicker/color-palette.component.js +6 -3
  83. package/dist/npm/colorpicker/colorpicker.component.js +313 -50
  84. package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +1 -1
  85. package/dist/npm/colorpicker/flatcolorpicker-header.component.js +1 -1
  86. package/dist/npm/colorpicker/flatcolorpicker.component.js +7 -4
  87. package/dist/npm/common/models/fillmode.js +6 -0
  88. package/dist/npm/common/models/rounded.js +6 -0
  89. package/dist/npm/common/models/size.js +6 -0
  90. package/dist/npm/common/models/styling-classes.js +6 -0
  91. package/dist/npm/common/models.js +6 -0
  92. package/dist/npm/common/utils.js +37 -0
  93. package/dist/npm/main.js +0 -2
  94. package/dist/npm/maskedtextbox/maskedtextbox.component.js +100 -5
  95. package/dist/npm/numerictextbox/numerictextbox.component.js +115 -19
  96. package/dist/npm/package-metadata.js +1 -1
  97. package/dist/npm/radiobutton/radiobutton.directive.js +54 -2
  98. package/dist/npm/shared/textarea.directive.js +3 -2
  99. package/dist/npm/slider/slider.component.js +1 -1
  100. package/dist/npm/switch/switch.component.js +166 -20
  101. package/dist/npm/text-fields-common/text-fields-base.js +1 -1
  102. package/dist/npm/textarea/textarea.component.js +100 -4
  103. package/dist/npm/textbox/textbox.component.js +107 -10
  104. package/dist/npm/textbox/textbox.directive.js +3 -2
  105. package/dist/npm/textbox.module.js +0 -3
  106. package/dist/systemjs/kendo-angular-inputs.js +1 -1
  107. package/package.json +12 -12
  108. package/dist/es/textbox/floating-label-input-adapter.js +0 -58
  109. package/dist/es/textbox/textbox-container.component.js +0 -224
  110. package/dist/es2015/textbox/floating-label-input-adapter.d.ts +0 -20
  111. package/dist/es2015/textbox/floating-label-input-adapter.js +0 -52
  112. package/dist/es2015/textbox/textbox-container.component.d.ts +0 -59
  113. package/dist/es2015/textbox/textbox-container.component.js +0 -209
  114. package/dist/npm/textbox/floating-label-input-adapter.js +0 -60
  115. package/dist/npm/textbox/textbox-container.component.js +0 -226
@@ -5,10 +5,10 @@
5
5
  import { __extends, __decorate, __param, __metadata, __assign } from 'tslib';
6
6
  import { isDevMode, Directive, Optional, TemplateRef, Input, Output, EventEmitter, HostBinding, ViewChild, ElementRef, ContentChild, Component, forwardRef, Injector, Renderer2, NgZone, ChangeDetectorRef, Inject, Injectable, HostListener, ViewChildren, QueryList, NgModule, ViewContainerRef, ContentChildren } from '@angular/core';
7
7
  import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, RadioControlValueAccessor } from '@angular/forms';
8
- import { Subscription, fromEvent, interval, merge, Observable, BehaviorSubject, Subject } from 'rxjs';
8
+ import { Subscription, fromEvent, interval, merge, BehaviorSubject, Subject } from 'rxjs';
9
9
  import { take, filter, concatMap, startWith, takeUntil, skip, debounceTime, throttleTime } from 'rxjs/operators';
10
10
  import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages, MessageService } from '@progress/kendo-angular-l10n';
11
- import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent } from '@progress/kendo-angular-common';
11
+ import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent, closest } from '@progress/kendo-angular-common';
12
12
  import { validatePackage } from '@progress/kendo-licensing';
13
13
  import { browser, mobileOS, detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
14
14
  import { IntlService } from '@progress/kendo-angular-intl';
@@ -48,6 +48,43 @@ var fitIntoBounds = function (contender, min, max) {
48
48
  }
49
49
  return contender <= min ? min : contender >= max ? max : contender;
50
50
  };
51
+ var SIZES = {
52
+ small: 'sm',
53
+ medium: 'md',
54
+ large: 'lg'
55
+ };
56
+ var ROUNDNESS = {
57
+ small: 'sm',
58
+ medium: 'md',
59
+ large: 'lg',
60
+ full: 'full'
61
+ };
62
+ /**
63
+ * @hidden
64
+ *
65
+ * Returns the styling classes to be added and removed
66
+ */
67
+ var getStylingClasses = function (componentType, stylingOption, previousValue, newValue) {
68
+ switch (stylingOption) {
69
+ case 'size':
70
+ return {
71
+ toRemove: "k-" + componentType + "-" + SIZES[previousValue],
72
+ toAdd: newValue ? "k-" + componentType + "-" + SIZES[newValue] : null
73
+ };
74
+ case 'rounded':
75
+ return {
76
+ toRemove: "k-rounded-" + ROUNDNESS[previousValue],
77
+ toAdd: newValue ? "k-rounded-" + ROUNDNESS[newValue] : null
78
+ };
79
+ case 'fillMode':
80
+ return {
81
+ toRemove: "k-" + componentType + "-" + previousValue,
82
+ toAdd: newValue ? "k-" + componentType + "-" + newValue : null
83
+ };
84
+ default:
85
+ break;
86
+ }
87
+ };
51
88
 
52
89
  /**
53
90
  * @hidden
@@ -479,7 +516,7 @@ var containsFocus = function (hostElement, contender) {
479
516
  /**
480
517
  * @hidden
481
518
  */
482
- var closest = function (node, predicate) {
519
+ var closest$1 = function (node, predicate) {
483
520
  while (node && !predicate(node)) {
484
521
  node = node.parentNode;
485
522
  }
@@ -493,7 +530,7 @@ var packageMetadata = {
493
530
  name: '@progress/kendo-angular-inputs',
494
531
  productName: 'Kendo UI for Angular',
495
532
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
496
- publishDate: 1639665048,
533
+ publishDate: 1641996688,
497
534
  version: '',
498
535
  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'
499
536
  };
@@ -1302,7 +1339,7 @@ var SliderComponent = /** @class */ (function (_super) {
1302
1339
  { provide: KendoInput, useExisting: forwardRef(function () { return SliderComponent_1; }) }
1303
1340
  ],
1304
1341
  selector: 'kendo-slider',
1305
- template: "\n <ng-container kendoSliderLocalizedMessages\n i18n-increment=\"kendo.slider.increment|The title of the **Increase** button of the Slider.\"\n increment=\"increment\"\n i18n-decrement=\"kendo.slider.decrement|The title of the **Decrease** button of the Slider.\"\n decrement=\"decrement\"\n i18n-dragHandle=\"kendo.slider.dragHandle|The title of the drag handle of the Slider.\"\n dragHandle=\"Drag\"\n >\n <div class=\"k-slider-wrap\" #wrap\n [class.k-slider-buttons]=\"showButtons\"\n [class.k-slider-topleft]=\"tickPlacement === 'before'\"\n [class.k-slider-bottomright]=\"tickPlacement === 'after'\"\n [kendoEventsOutsideAngular]=\"{ click: onWrapClick, keydown: onKeyDown }\"\n >\n <span\n #decreaseButton\n *ngIf=\"showButtons\"\n class=\"k-button k-button-decrease\"\n [title]=\"decrementMessage\"\n role=\"presentation\"\n >\n <span class=\"k-icon\"\n [class.k-i-arrow-w]=\"!vertical\"\n [class.k-i-arrow-s]=\"vertical\"\n >\n </span>\n </span>\n <span\n *ngIf=\"showButtons\"\n #increaseButton\n class=\"k-button k-button-increase\"\n [title]=\"incrementMessage\"\n (click)=\"$event.preventDefault()\"\n [attr.aria-label]=\"currentValue\"\n >\n <span class=\"k-icon\"\n [class.k-i-arrow-e]=\"!vertical\"\n [class.k-i-arrow-n]=\"vertical\"\n >\n </span>\n </span>\n <ul kendoSliderTicks\n #ticks\n *ngIf=\"tickPlacement !== 'none'\"\n [tickTitle]=\"title\"\n [vertical]=\"vertical\"\n [step]=\"smallStep\"\n [largeStep]=\"largeStep\"\n [min]=\"min\"\n [max]=\"max\"\n [labelTemplate]=\"labelTemplate?.templateRef\"\n [attr.aria-hidden]=\"true\"\n >\n </ul>\n <div #track class=\"k-slider-track\">\n <div #sliderSelection class=\"k-slider-selection\">\n </div>\n <a #draghandle\n role=\"slider\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuenow]=\"currentValue\"\n [attr.aria-valuetext]=\"currentValue\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n [attr.aria-orientation]=\"vertical ? 'vertical' : 'horizontal'\"\n [style.touch-action]=\"isDisabled ? '' : 'none'\"\n class=\"k-draghandle\"\n [title]=\"dragHandleMessage\"\n [attr.tabindex]=\"disabled ? '-1' : tabIndex\"\n [id]=\"focusableId\"\n kendoDraggable\n (kendoPress)=\"ifEnabled(handleDragPress, $event)\"\n (kendoDrag)=\"ifEnabled(onHandleDrag, $event)\"\n (kendoRelease)=\"ifEnabled(onHandleRelease, $event)\"\n ></a>\n </div>\n <kendo-resize-sensor (resize)=\"sizeComponent(false)\"></kendo-resize-sensor>\n </div>\n "
1342
+ template: "\n <ng-container kendoSliderLocalizedMessages\n i18n-increment=\"kendo.slider.increment|The title of the **Increase** button of the Slider.\"\n increment=\"increment\"\n i18n-decrement=\"kendo.slider.decrement|The title of the **Decrease** button of the Slider.\"\n decrement=\"decrement\"\n i18n-dragHandle=\"kendo.slider.dragHandle|The title of the drag handle of the Slider.\"\n dragHandle=\"Drag\"\n >\n <div class=\"k-slider-wrap\" #wrap\n [class.k-slider-buttons]=\"showButtons\"\n [class.k-slider-topleft]=\"tickPlacement === 'before'\"\n [class.k-slider-bottomright]=\"tickPlacement === 'after'\"\n [kendoEventsOutsideAngular]=\"{ click: onWrapClick, keydown: onKeyDown }\"\n >\n <button *ngIf=\"showButtons\" type=\"button\" #decreaseButton\n class=\"k-button-decrease k-button k-button-md k-rounded-full k-button-rectangle k-button-solid k-button-solid-base k-icon-button\"\n [title]=\"decrementMessage\"\n [attr.tabindex]=\"-1\"\n role=\"presentation\">\n <span class=\"k-button-icon k-icon\"\n [class.k-i-arrow-w]=\"!vertical\"\n [class.k-i-arrow-s]=\"vertical\">\n </span>\n </button>\n <button *ngIf=\"showButtons\" type=\"button\" #increaseButton\n class=\"k-button-increase k-button k-button-md k-rounded-full k-button-rectangle k-button-solid k-button-solid-base k-icon-button\"\n [title]=\"incrementMessage\"\n (click)=\"$event.preventDefault()\"\n [attr.tabindex]=\"-1\"\n [attr.aria-label]=\"currentValue\"\n role=\"presentation\">\n <span class=\"k-button-icon k-icon\"\n [class.k-i-arrow-e]=\"!vertical\"\n [class.k-i-arrow-n]=\"vertical\">\n </span>\n </button>\n <ul kendoSliderTicks\n #ticks\n *ngIf=\"tickPlacement !== 'none'\"\n [tickTitle]=\"title\"\n [vertical]=\"vertical\"\n [step]=\"smallStep\"\n [largeStep]=\"largeStep\"\n [min]=\"min\"\n [max]=\"max\"\n [labelTemplate]=\"labelTemplate?.templateRef\"\n [attr.aria-hidden]=\"true\"\n >\n </ul>\n <div #track class=\"k-slider-track\">\n <div #sliderSelection class=\"k-slider-selection\">\n </div>\n <a #draghandle\n role=\"slider\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuenow]=\"currentValue\"\n [attr.aria-valuetext]=\"currentValue\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n [attr.aria-orientation]=\"vertical ? 'vertical' : 'horizontal'\"\n [style.touch-action]=\"isDisabled ? '' : 'none'\"\n class=\"k-draghandle\"\n [title]=\"dragHandleMessage\"\n [attr.tabindex]=\"disabled ? '-1' : tabIndex\"\n [id]=\"focusableId\"\n kendoDraggable\n (kendoPress)=\"ifEnabled(handleDragPress, $event)\"\n (kendoDrag)=\"ifEnabled(onHandleDrag, $event)\"\n (kendoRelease)=\"ifEnabled(onHandleRelease, $event)\"\n ></a>\n </div>\n <kendo-resize-sensor (resize)=\"sizeComponent(false)\"></kendo-resize-sensor>\n </div>\n "
1306
1343
  }),
1307
1344
  __metadata("design:paramtypes", [LocalizationService,
1308
1345
  Injector,
@@ -1819,7 +1856,7 @@ var RangeSliderComponent = /** @class */ (function (_super) {
1819
1856
  return RangeSliderComponent;
1820
1857
  }(SliderBase));
1821
1858
 
1822
- var FOCUSED = 'k-state-focused';
1859
+ var FOCUSED = 'k-focus';
1823
1860
  /**
1824
1861
  * Represents the [Kendo UI Switch component for Angular]({% slug overview_switch %}).
1825
1862
  */
@@ -1865,13 +1902,20 @@ var SwitchComponent = /** @class */ (function () {
1865
1902
  * @hidden
1866
1903
  */
1867
1904
  this.initialized = false;
1905
+ this.hostClickSubscription = new Subscription;
1868
1906
  this._checked = false;
1907
+ this._size = 'medium';
1908
+ this._trackRounded = 'full';
1909
+ this._thumbRounded = 'full';
1869
1910
  this.ngChange = function (_) { };
1870
1911
  this.ngTouched = function () { };
1871
1912
  /**
1872
1913
  * @hidden
1873
1914
  */
1874
1915
  this.handleFocus = function () {
1916
+ if (_this.isFocused) {
1917
+ return;
1918
+ }
1875
1919
  _this.focused = true;
1876
1920
  if (hasObservers(_this.onFocus)) {
1877
1921
  _this.ngZone.run(function () {
@@ -1882,7 +1926,11 @@ var SwitchComponent = /** @class */ (function () {
1882
1926
  /**
1883
1927
  * @hidden
1884
1928
  */
1885
- this.handleBlur = function () {
1929
+ this.handleBlur = function (event) {
1930
+ var relatedTarget = event && event.relatedTarget;
1931
+ if (_this.hostElement.nativeElement.contains(relatedTarget)) {
1932
+ return;
1933
+ }
1886
1934
  _this.changeDetector.markForCheck();
1887
1935
  _this.focused = false;
1888
1936
  if (hasObservers(_this.onBlur) || requiresZoneOnBlur(_this.control)) {
@@ -1912,6 +1960,68 @@ var SwitchComponent = /** @class */ (function () {
1912
1960
  enumerable: true,
1913
1961
  configurable: true
1914
1962
  });
1963
+ Object.defineProperty(SwitchComponent.prototype, "size", {
1964
+ get: function () {
1965
+ return this._size;
1966
+ },
1967
+ /**
1968
+ * Specifies the size of the Switch.
1969
+ *
1970
+ * The possible values are:
1971
+ * * `'small'`
1972
+ * * `'medium'` (default)
1973
+ * * `'large'`
1974
+ * * `null`
1975
+ */
1976
+ set: function (size) {
1977
+ this.handleClasses(size, 'size');
1978
+ this._size = size;
1979
+ },
1980
+ enumerable: true,
1981
+ configurable: true
1982
+ });
1983
+ Object.defineProperty(SwitchComponent.prototype, "thumbRounded", {
1984
+ get: function () {
1985
+ return this._thumbRounded;
1986
+ },
1987
+ /**
1988
+ * Specifies the border radius of the Switch thumb.
1989
+ *
1990
+ * The possible values are:
1991
+ * * `'full'` (default)
1992
+ * * `'small'`
1993
+ * * `'medium'`
1994
+ * * `'large'`
1995
+ * * `null`
1996
+ */
1997
+ set: function (thumbRounded) {
1998
+ this.handleThumbClasses(thumbRounded);
1999
+ this._thumbRounded = thumbRounded;
2000
+ },
2001
+ enumerable: true,
2002
+ configurable: true
2003
+ });
2004
+ Object.defineProperty(SwitchComponent.prototype, "trackRounded", {
2005
+ get: function () {
2006
+ return this._trackRounded;
2007
+ },
2008
+ /**
2009
+ * Specifies the border radius of the Switch track.
2010
+ *
2011
+ * The possible values are:
2012
+ * * `'full'` (default)
2013
+ * * `'small'`
2014
+ * * `'medium'`
2015
+ * * `'large'`
2016
+ * * `null`
2017
+ */
2018
+ set: function (trackRounded) {
2019
+ this.handleTrackClasses(trackRounded);
2020
+ this._trackRounded = trackRounded;
2021
+ },
2022
+ enumerable: true,
2023
+ configurable: true
2024
+ });
1915
2025
  Object.defineProperty(SwitchComponent.prototype, "tabIndex", {
1916
2026
  get: function () {
1917
2027
  return this.tabindex;
@@ -1996,10 +2106,23 @@ var SwitchComponent = /** @class */ (function () {
1996
2106
  this.control = this.injector.get(NgControl, null);
1997
2107
  this.ngZone.onStable.pipe(take(1)).subscribe(function () { return _this.initialized = true; });
1998
2108
  };
2109
+ SwitchComponent.prototype.ngAfterViewInit = function () {
2110
+ var wrapper = this.hostElement.nativeElement;
2111
+ this.attachHostClickHandler();
2112
+ if (!this.checked && !wrapper.classList.contains('k-switch-off')) {
2113
+ this.renderer.addClass(wrapper, 'k-switch-off');
2114
+ }
2115
+ this.handleClasses(this.size, 'size');
2116
+ this.handleTrackClasses(this.trackRounded);
2117
+ this.handleThumbClasses(this.thumbRounded);
2118
+ };
1999
2119
  SwitchComponent.prototype.ngOnDestroy = function () {
2000
2120
  if (this.localizationChangeSubscription) {
2001
2121
  this.localizationChangeSubscription.unsubscribe();
2002
2122
  }
2123
+ if (this.hostClickSubscription) {
2124
+ this.hostClickSubscription.unsubscribe();
2125
+ }
2003
2126
  };
2004
2127
  /**
2005
2128
  * Focuses the Switch.
@@ -2017,19 +2140,19 @@ var SwitchComponent = /** @class */ (function () {
2017
2140
  * ```
2018
2141
  */
2019
2142
  SwitchComponent.prototype.focus = function () {
2020
- if (!this.wrapper) {
2143
+ if (!this.track) {
2021
2144
  return;
2022
2145
  }
2023
- this.wrapper.nativeElement.focus();
2146
+ this.track.nativeElement.focus();
2024
2147
  };
2025
2148
  /**
2026
2149
  * Blurs the Switch.
2027
2150
  */
2028
2151
  SwitchComponent.prototype.blur = function () {
2029
- if (!this.wrapper) {
2152
+ if (!this.track) {
2030
2153
  return;
2031
2154
  }
2032
- this.wrapper.nativeElement.blur();
2155
+ this.track.nativeElement.blur();
2033
2156
  };
2034
2157
  /**
2035
2158
  * @hidden
@@ -2079,7 +2202,7 @@ var SwitchComponent = /** @class */ (function () {
2079
2202
  };
2080
2203
  /**
2081
2204
  * @hidden
2082
- * Used by the TextBoxContainer to determine if the component is empty.
2205
+ * Used by the FloatingLabel to determine if the component is empty.
2083
2206
  */
2084
2207
  SwitchComponent.prototype.isEmpty = function () {
2085
2208
  return false;
@@ -2098,12 +2221,12 @@ var SwitchComponent = /** @class */ (function () {
2098
2221
  Object.defineProperty(SwitchComponent.prototype, "focused", {
2099
2222
  set: function (value) {
2100
2223
  if (this.isFocused !== value && this.hostElement) {
2101
- var element = this.hostElement.nativeElement;
2224
+ var wrapper = this.hostElement.nativeElement;
2102
2225
  if (value) {
2103
- this.renderer.addClass(element, FOCUSED);
2226
+ this.renderer.addClass(wrapper, FOCUSED);
2104
2227
  }
2105
2228
  else {
2106
- this.renderer.removeClass(element, FOCUSED);
2229
+ this.renderer.removeClass(wrapper, FOCUSED);
2107
2230
  }
2108
2231
  this.isFocused = value;
2109
2232
  }
@@ -2111,14 +2234,54 @@ var SwitchComponent = /** @class */ (function () {
2111
2234
  enumerable: true,
2112
2235
  configurable: true
2113
2236
  });
2237
+ SwitchComponent.prototype.attachHostClickHandler = function () {
2238
+ var _this = this;
2239
+ this.ngZone.runOutsideAngular(function () {
2240
+ _this.hostClickSubscription.add(_this.renderer.listen(_this.hostElement.nativeElement, 'click', _this.clickHandler));
2241
+ });
2242
+ };
2114
2243
  SwitchComponent.prototype.setHostClasses = function (value) {
2244
+ var wrapper = this.hostElement.nativeElement;
2115
2245
  if (value) {
2116
- this.renderer.removeClass(this.hostElement.nativeElement, 'k-switch-off');
2117
- this.renderer.addClass(this.hostElement.nativeElement, 'k-switch-on');
2246
+ this.renderer.removeClass(wrapper, 'k-switch-off');
2247
+ this.renderer.addClass(wrapper, 'k-switch-on');
2118
2248
  }
2119
2249
  else {
2120
- this.renderer.removeClass(this.hostElement.nativeElement, 'k-switch-on');
2121
- this.renderer.addClass(this.hostElement.nativeElement, 'k-switch-off');
2250
+ this.renderer.removeClass(wrapper, 'k-switch-on');
2251
+ this.renderer.addClass(wrapper, 'k-switch-off');
2252
+ }
2253
+ };
2254
+ SwitchComponent.prototype.handleClasses = function (value, input) {
2255
+ var elem = this.hostElement.nativeElement;
2256
+ var classes = getStylingClasses('switch', input, this[input], value);
2257
+ if (classes.toRemove) {
2258
+ this.renderer.removeClass(elem, classes.toRemove);
2259
+ }
2260
+ if (classes.toAdd) {
2261
+ this.renderer.addClass(elem, classes.toAdd);
2262
+ }
2263
+ };
2264
+ SwitchComponent.prototype.handleTrackClasses = function (value) {
2265
+ var elem = this.hostElement.nativeElement;
2266
+ var track = this.track.nativeElement;
2267
+ var classes = getStylingClasses('switch', 'rounded', this.trackRounded, value);
2268
+ if (classes.toRemove) {
2269
+ this.renderer.removeClass(elem, classes.toRemove);
2270
+ this.renderer.removeClass(track, classes.toRemove);
2271
+ }
2272
+ if (classes.toAdd) {
2273
+ this.renderer.addClass(elem, classes.toAdd);
2274
+ this.renderer.addClass(track, classes.toAdd);
2275
+ }
2276
+ };
2277
+ SwitchComponent.prototype.handleThumbClasses = function (value) {
2278
+ var thumb = this.thumb.nativeElement;
2279
+ var classes = getStylingClasses('switch', 'rounded', this.thumbRounded, value);
2280
+ if (classes.toRemove) {
2281
+ this.renderer.removeClass(thumb, classes.toRemove);
2282
+ }
2283
+ if (classes.toAdd) {
2284
+ this.renderer.addClass(thumb, classes.toAdd);
2122
2285
  }
2123
2286
  };
2124
2287
  var SwitchComponent_1;
@@ -2151,6 +2314,21 @@ var SwitchComponent = /** @class */ (function () {
2151
2314
  Input(),
2152
2315
  __metadata("design:type", Number)
2153
2316
  ], SwitchComponent.prototype, "tabindex", void 0);
2317
+ __decorate([
2318
+ Input(),
2319
+ __metadata("design:type", String),
2320
+ __metadata("design:paramtypes", [String])
2321
+ ], SwitchComponent.prototype, "size", null);
2322
+ __decorate([
2323
+ Input(),
2324
+ __metadata("design:type", String),
2325
+ __metadata("design:paramtypes", [String])
2326
+ ], SwitchComponent.prototype, "thumbRounded", null);
2327
+ __decorate([
2328
+ Input(),
2329
+ __metadata("design:type", String),
2330
+ __metadata("design:paramtypes", [String])
2331
+ ], SwitchComponent.prototype, "trackRounded", null);
2154
2332
  __decorate([
2155
2333
  Input(),
2156
2334
  __metadata("design:type", Number),
@@ -2168,10 +2346,6 @@ var SwitchComponent = /** @class */ (function () {
2168
2346
  Output(),
2169
2347
  __metadata("design:type", EventEmitter)
2170
2348
  ], SwitchComponent.prototype, "valueChange", void 0);
2171
- __decorate([
2172
- ViewChild('wrapper', { static: true }),
2173
- __metadata("design:type", Object)
2174
- ], SwitchComponent.prototype, "wrapper", void 0);
2175
2349
  __decorate([
2176
2350
  HostBinding('attr.dir'),
2177
2351
  __metadata("design:type", String)
@@ -2196,10 +2370,18 @@ var SwitchComponent = /** @class */ (function () {
2196
2370
  __metadata("design:type", Boolean)
2197
2371
  ], SwitchComponent.prototype, "hostClasses", void 0);
2198
2372
  __decorate([
2199
- HostBinding('class.k-state-disabled'),
2373
+ HostBinding('class.k-disabled'),
2200
2374
  __metadata("design:type", Boolean),
2201
2375
  __metadata("design:paramtypes", [])
2202
2376
  ], SwitchComponent.prototype, "disabledClass", null);
2377
+ __decorate([
2378
+ ViewChild('track', { static: true }),
2379
+ __metadata("design:type", Object)
2380
+ ], SwitchComponent.prototype, "track", void 0);
2381
+ __decorate([
2382
+ ViewChild('thumb', { static: true }),
2383
+ __metadata("design:type", Object)
2384
+ ], SwitchComponent.prototype, "thumb", void 0);
2203
2385
  SwitchComponent = SwitchComponent_1 = __decorate([
2204
2386
  Component({
2205
2387
  exportAs: 'kendoSwitch',
@@ -2217,7 +2399,7 @@ var SwitchComponent = /** @class */ (function () {
2217
2399
  }
2218
2400
  ],
2219
2401
  selector: 'kendo-switch',
2220
- template: "\n <ng-container kendoSwitchLocalizedMessages\n i18n-on=\"kendo.switch.on|The **On** label of the Switch.\"\n on=\"ON\"\n i18n-off=\"kendo.switch.off|The **Off** label of the Switch.\"\n off=\"OFF\"\n >\n\n <span\n #wrapper\n class=\"k-switch-container\"\n [id]=\"focusableId\"\n role=\"switch\"\n [style.transitionDuration]=\"initialized ? '200ms' : '0ms'\"\n [attr.aria-checked]=\"checked\"\n [attr.tabindex]=\"(disabled ? undefined : tabIndex)\"\n [kendoEventsOutsideAngular]=\"{ click: clickHandler, keydown: keyDownHandler, focus: handleFocus, blur: handleBlur }\"\n >\n <span class=\"k-switch-label-on\" [attr.aria-hidden]=\"true\" >{{onLabelMessage}}</span>\n <span class=\"k-switch-label-off\" [attr.aria-hidden]=\"true\">{{offLabelMessage}}</span>\n <span class=\"k-switch-handle\" [style.transitionDuration]=\"initialized ? '200ms' : '0ms'\"></span>\n </span>\n "
2402
+ template: "\n <ng-container kendoSwitchLocalizedMessages\n i18n-on=\"kendo.switch.on|The **On** label of the Switch.\"\n on=\"ON\"\n i18n-off=\"kendo.switch.off|The **Off** label of the Switch.\"\n off=\"OFF\"\n >\n\n <span\n #track\n class=\"k-switch-track\"\n [id]=\"focusableId\"\n role=\"switch\"\n [style.transitionDuration]=\"initialized ? '200ms' : '0ms'\"\n [attr.aria-checked]=\"checked\"\n [attr.tabindex]=\"(disabled ? undefined : tabIndex)\"\n [kendoEventsOutsideAngular]=\"{ keydown: keyDownHandler, focus: handleFocus, blur: handleBlur }\"\n >\n <span class=\"k-switch-label-on\" [attr.aria-hidden]=\"true\" >{{onLabelMessage}}</span>\n <span class=\"k-switch-label-off\" [attr.aria-hidden]=\"true\">{{offLabelMessage}}</span>\n </span>\n <span\n class=\"k-switch-thumb-wrap\"\n tabindex=\"-1\"\n [style.transitionDuration]=\"initialized ? '200ms' : '0ms'\" [kendoEventsOutsideAngular]=\"{\n keydown: keyDownHandler,\n focus: handleFocus,\n blur: handleBlur\n }\">\n <span #thumb class=\"k-switch-thumb\"></span>\n </span>\n "
2221
2403
  }),
2222
2404
  __metadata("design:paramtypes", [Renderer2,
2223
2405
  ElementRef,
@@ -2229,6 +2411,123 @@ var SwitchComponent = /** @class */ (function () {
2229
2411
  return SwitchComponent;
2230
2412
  }());
2231
2413
 
2414
+ /**
2415
+ * Represents the [Kendo UI TextBox directive]({% slug overview_textbox %}) for the Inputs components for Angular.
2416
+ * Used to style the textbox of any `input` element.
2417
+ *
2418
+ * @example
2419
+ * ```ts-no-run
2420
+ * <input kendoTextBox />
2421
+ * <input kendoTextBox type="email" />
2422
+ * <input kendoTextBox type="password" />
2423
+ * ```
2424
+ */
2425
+ var TextBoxDirective = /** @class */ (function () {
2426
+ function TextBoxDirective(renderer, inputElement, ngZone) {
2427
+ this.renderer = renderer;
2428
+ this.inputElement = inputElement;
2429
+ this.ngZone = ngZone;
2430
+ this.hostClasses = true;
2431
+ /**
2432
+ * @hidden
2433
+ */
2434
+ this.onFocus = new EventEmitter();
2435
+ /**
2436
+ * @hidden
2437
+ */
2438
+ this.onBlur = new EventEmitter();
2439
+ /**
2440
+ * @hidden
2441
+ */
2442
+ this.onValueChange = new EventEmitter();
2443
+ /**
2444
+ * @hidden
2445
+ */
2446
+ this.autoFillStart = new EventEmitter();
2447
+ /**
2448
+ * @hidden
2449
+ */
2450
+ this.autoFillEnd = new EventEmitter();
2451
+ this.listeners = [];
2452
+ }
2453
+ TextBoxDirective_1 = TextBoxDirective;
2454
+ Object.defineProperty(TextBoxDirective.prototype, "value", {
2455
+ /**
2456
+ * @hidden
2457
+ */
2458
+ get: function () {
2459
+ return this.inputElement.nativeElement.value;
2460
+ },
2461
+ /**
2462
+ * @hidden
2463
+ */
2464
+ set: function (text) {
2465
+ if (!this.inputElement) {
2466
+ return;
2467
+ }
2468
+ this.inputElement.nativeElement.value = (text === undefined || text === null) ? '' : text;
2469
+ this.onValueChange.emit();
2470
+ },
2471
+ enumerable: true,
2472
+ configurable: true
2473
+ });
2474
+ Object.defineProperty(TextBoxDirective.prototype, "id", {
2475
+ get: function () {
2476
+ return this.inputElement.nativeElement.id;
2477
+ },
2478
+ set: function (id) {
2479
+ this.renderer.setAttribute(this.inputElement.nativeElement, 'id', id);
2480
+ },
2481
+ enumerable: true,
2482
+ configurable: true
2483
+ });
2484
+ TextBoxDirective.prototype.ngAfterViewInit = function () {
2485
+ var _this = this;
2486
+ var input = this.inputElement.nativeElement;
2487
+ this.listeners = [
2488
+ this.renderer.listen(input, 'focus', function () { return _this.onFocus.emit(); }),
2489
+ this.renderer.listen(input, 'blur', function () { return _this.onBlur.emit(); })
2490
+ ];
2491
+ this.ngZone.runOutsideAngular(function () {
2492
+ _this.renderer.listen(input, 'animationstart', function (e) {
2493
+ if (e.animationName === 'autoFillStart') {
2494
+ _this.autoFillStart.emit();
2495
+ }
2496
+ else if (e.animationName === 'autoFillEnd') {
2497
+ _this.autoFillEnd.emit();
2498
+ }
2499
+ });
2500
+ });
2501
+ };
2502
+ TextBoxDirective.prototype.ngOnDestroy = function () {
2503
+ this.listeners.forEach(function (listener) { return listener(); });
2504
+ };
2505
+ var TextBoxDirective_1;
2506
+ __decorate([
2507
+ HostBinding('class.k-textbox'),
2508
+ HostBinding('class.k-input'),
2509
+ __metadata("design:type", Boolean)
2510
+ ], TextBoxDirective.prototype, "hostClasses", void 0);
2511
+ __decorate([
2512
+ Input(),
2513
+ __metadata("design:type", String),
2514
+ __metadata("design:paramtypes", [String])
2515
+ ], TextBoxDirective.prototype, "value", null);
2516
+ TextBoxDirective = TextBoxDirective_1 = __decorate([
2517
+ Directive({
2518
+ selector: 'input[kendoTextBox]',
2519
+ providers: [{
2520
+ provide: KendoInput,
2521
+ useExisting: forwardRef(function () { return TextBoxDirective_1; })
2522
+ }]
2523
+ }),
2524
+ __metadata("design:paramtypes", [Renderer2,
2525
+ ElementRef,
2526
+ NgZone])
2527
+ ], TextBoxDirective);
2528
+ return TextBoxDirective;
2529
+ }());
2530
+
2232
2531
  /**
2233
2532
  * Represents the [Kendo UI TextArea directive for the Inputs components for Angular]({% slug overview_textarea %}).
2234
2533
  * Provides floating labels to `textarea` elements.
@@ -2245,7 +2544,7 @@ var TextAreaDirective = /** @class */ (function () {
2245
2544
  this.zone = zone;
2246
2545
  this.changeDetector = changeDetector;
2247
2546
  this.injector = injector;
2248
- this.elementClass = true;
2547
+ this.elementClasses = true;
2249
2548
  this.autofillClass = true;
2250
2549
  /**
2251
2550
  * Fires each time the textarea value is changed.
@@ -2437,8 +2736,9 @@ var TextAreaDirective = /** @class */ (function () {
2437
2736
  var TextAreaDirective_1;
2438
2737
  __decorate([
2439
2738
  HostBinding('class.k-textarea'),
2739
+ HostBinding('class.k-input'),
2440
2740
  __metadata("design:type", Boolean)
2441
- ], TextAreaDirective.prototype, "elementClass", void 0);
2741
+ ], TextAreaDirective.prototype, "elementClasses", void 0);
2442
2742
  __decorate([
2443
2743
  HostBinding('class.k-autofill'),
2444
2744
  __metadata("design:type", Boolean)
@@ -2484,415 +2784,36 @@ var TextAreaDirective = /** @class */ (function () {
2484
2784
  /**
2485
2785
  * @hidden
2486
2786
  */
2487
- var FloatingLabelInputAdapter = /** @class */ (function () {
2488
- function FloatingLabelInputAdapter(component, formControl) {
2489
- this.component = component;
2490
- var isObservableOrEventEmitter = function (event) { return event instanceof Observable || event instanceof EventEmitter; };
2491
- if (isObservableOrEventEmitter(component.onFocus)) {
2492
- this.onFocus = component.onFocus;
2493
- }
2494
- if (isObservableOrEventEmitter(component.autoFillStart)) {
2495
- this.autoFillStart = component.autoFillStart;
2496
- }
2497
- if (isObservableOrEventEmitter(component.autoFillEnd)) {
2498
- this.autoFillEnd = component.autoFillEnd;
2499
- }
2500
- if (isObservableOrEventEmitter(component.onBlur)) {
2501
- this.onBlur = component.onBlur;
2502
- }
2503
- if (formControl) {
2504
- this.onValueChange = formControl.valueChanges;
2505
- }
2506
- else if (component.onValueChange) {
2507
- this.onValueChange = component.onValueChange;
2787
+ var createMaxValidator = function (maxValue) {
2788
+ return function (c) {
2789
+ if (!isPresent(maxValue) || !isPresent(c.value) || c.value <= maxValue) {
2790
+ return null;
2508
2791
  }
2509
- }
2510
- Object.defineProperty(FloatingLabelInputAdapter.prototype, "focusableId", {
2511
- get: function () {
2512
- var component = this.component;
2513
- if ('focusableId' in component) {
2514
- return component.focusableId;
2515
- }
2516
- else if ('id' in component) {
2517
- return component.id;
2518
- }
2519
- return "";
2520
- },
2521
- set: function (value) {
2522
- var component = this.component;
2523
- if ('focusableId' in component) {
2524
- component.focusableId = value;
2792
+ return {
2793
+ maxError: {
2794
+ maxValue: maxValue,
2795
+ value: c.value
2525
2796
  }
2526
- else if ('id' in component) {
2527
- component.id = value;
2797
+ };
2798
+ };
2799
+ };
2800
+
2801
+ /**
2802
+ * @hidden
2803
+ */
2804
+ var createMinValidator = function (minValue) {
2805
+ return function (c) {
2806
+ if (!isPresent(minValue) || !isPresent(c.value) || c.value >= minValue) {
2807
+ return null;
2808
+ }
2809
+ return {
2810
+ minError: {
2811
+ minValue: minValue,
2812
+ value: c.value
2528
2813
  }
2529
- },
2530
- enumerable: true,
2531
- configurable: true
2532
- });
2533
- return FloatingLabelInputAdapter;
2534
- }());
2535
-
2536
- var isFunction = function (x) { return Object.prototype.toString.call(x) === '[object Function]'; };
2537
- /**
2538
- * @hidden
2539
- */
2540
- var TextBoxContainerComponent = /** @class */ (function () {
2541
- function TextBoxContainerComponent(elementRef, renderer, changeDetectorRef, rtl) {
2542
- this.elementRef = elementRef;
2543
- this.renderer = renderer;
2544
- this.changeDetectorRef = changeDetectorRef;
2545
- /**
2546
- * @hidden
2547
- */
2548
- this.focused = false;
2549
- /**
2550
- * @hidden
2551
- */
2552
- this.empty = true;
2553
- /**
2554
- * @hidden
2555
- */
2556
- this.invalid = false;
2557
- this._subscriptions = [];
2558
- this.autoFillStarted = false;
2559
- this.direction = rtl ? 'rtl' : 'ltr';
2560
- this.renderer.removeAttribute(this.elementRef.nativeElement, "id");
2561
- }
2562
- Object.defineProperty(TextBoxContainerComponent.prototype, "hostClasses", {
2563
- get: function () {
2564
- return true;
2565
- },
2566
- enumerable: true,
2567
- configurable: true
2568
- });
2569
- Object.defineProperty(TextBoxContainerComponent.prototype, "textareaElementClass", {
2570
- get: function () {
2571
- return !!this.textarea;
2572
- },
2573
- enumerable: true,
2574
- configurable: true
2575
- });
2576
- Object.defineProperty(TextBoxContainerComponent.prototype, "focusedClass", {
2577
- get: function () {
2578
- return this.focused;
2579
- },
2580
- enumerable: true,
2581
- configurable: true
2582
- });
2583
- Object.defineProperty(TextBoxContainerComponent.prototype, "invalidClass", {
2584
- get: function () {
2585
- return this.invalid;
2586
- },
2587
- enumerable: true,
2588
- configurable: true
2589
- });
2590
- /**
2591
- * @hidden
2592
- */
2593
- TextBoxContainerComponent.prototype.ngAfterContentInit = function () {
2594
- var _this = this;
2595
- if (!this.formControl && !this.kendoInput) {
2596
- if (isDevMode()) {
2597
- throw new Error("The TextBoxContainer requires a Kendo Input component" +
2598
- " or a forms-bound component to function properly.");
2599
- }
2600
- return;
2601
- }
2602
- // add focus/blur/valueChange handlers
2603
- var control = new FloatingLabelInputAdapter(this.kendoInput || this.formControl.valueAccessor, this.formControl);
2604
- var setFocus = function (isFocused) { return function () {
2605
- _this.focused = isFocused;
2606
- _this.updateState();
2607
- }; };
2608
- this.subscribe(control, 'onFocus', setFocus(true));
2609
- this.subscribe(control, 'onBlur', setFocus(false));
2610
- this.subscribe(control, 'autoFillStart', function () {
2611
- _this.autoFillStarted = true;
2612
- _this.renderer.removeClass(_this.elementRef.nativeElement, 'k-state-empty');
2613
- });
2614
- this.subscribe(control, 'autoFillEnd', function () {
2615
- if (_this.autoFillStarted) {
2616
- _this.autoFillStarted = false;
2617
- if (_this.empty) {
2618
- _this.renderer.addClass(_this.elementRef.nativeElement, 'k-state-empty');
2619
- }
2620
- }
2621
- });
2622
- var updateState = function () { return _this.updateState(); };
2623
- updateState();
2624
- this.subscribe(control, 'onValueChange', updateState);
2625
- // set label id for floating label
2626
- if (this.id && control.focusableId) {
2627
- // input wins
2628
- this.id = control.focusableId;
2629
- }
2630
- else if (this.id) {
2631
- control.focusableId = this.id;
2632
- }
2633
- else if (control.focusableId) {
2634
- this.id = control.focusableId;
2635
- }
2636
- else {
2637
- var id = "_" + guid();
2638
- control.focusableId = id;
2639
- this.id = id;
2640
- }
2641
- };
2642
- /**
2643
- * @hidden
2644
- */
2645
- TextBoxContainerComponent.prototype.ngOnDestroy = function () {
2646
- this._subscriptions.forEach(function (s) { return s.unsubscribe(); });
2647
- this._subscriptions = [];
2648
- };
2649
- TextBoxContainerComponent.prototype.subscribe = function (control, eventName, handler) {
2650
- if (control[eventName] instanceof EventEmitter) {
2651
- var subscription = control[eventName].subscribe(handler);
2652
- this._subscriptions.push(subscription);
2653
- }
2654
- };
2655
- TextBoxContainerComponent.prototype.updateState = function () {
2656
- var empty = function (value) {
2657
- // zero is not an empty value (e.g., NumericTextBox)
2658
- if (value === 0 || value === false) {
2659
- return false;
2660
- }
2661
- // empty arrays are an empty value (e.g., MultiSelect)
2662
- if (Array.isArray(value) && !value.length) {
2663
- return true;
2664
- }
2665
- return !value;
2666
- };
2667
- var formControl = this.formControl;
2668
- if (formControl) {
2669
- var valueAccessor = formControl.valueAccessor;
2670
- if (isFunction(valueAccessor.isEmpty)) {
2671
- this.empty = valueAccessor.isEmpty();
2672
- }
2673
- else {
2674
- this.empty = empty(formControl.value);
2675
- }
2676
- this.invalid = formControl.invalid && (formControl.touched || formControl.dirty);
2677
- }
2678
- else {
2679
- this.empty = isFunction(this.kendoInput.isEmpty) ?
2680
- this.kendoInput.isEmpty() : empty(this.kendoInput.value);
2681
- }
2682
- if (this.empty) {
2683
- this.renderer.addClass(this.elementRef.nativeElement, 'k-state-empty');
2684
- }
2685
- else {
2686
- this.renderer.removeClass(this.elementRef.nativeElement, 'k-state-empty');
2687
- }
2688
- this.changeDetectorRef.markForCheck();
2689
- };
2690
- __decorate([
2691
- HostBinding('class.k-textbox-container'),
2692
- __metadata("design:type", Boolean),
2693
- __metadata("design:paramtypes", [])
2694
- ], TextBoxContainerComponent.prototype, "hostClasses", null);
2695
- __decorate([
2696
- HostBinding('class.k-textarea-wrapper'),
2697
- __metadata("design:type", Boolean),
2698
- __metadata("design:paramtypes", [])
2699
- ], TextBoxContainerComponent.prototype, "textareaElementClass", null);
2700
- __decorate([
2701
- HostBinding('class.k-state-focused'),
2702
- __metadata("design:type", Boolean),
2703
- __metadata("design:paramtypes", [])
2704
- ], TextBoxContainerComponent.prototype, "focusedClass", null);
2705
- __decorate([
2706
- HostBinding('class.k-state-invalid'),
2707
- __metadata("design:type", Boolean),
2708
- __metadata("design:paramtypes", [])
2709
- ], TextBoxContainerComponent.prototype, "invalidClass", null);
2710
- __decorate([
2711
- HostBinding('attr.dir'),
2712
- __metadata("design:type", String)
2713
- ], TextBoxContainerComponent.prototype, "direction", void 0);
2714
- __decorate([
2715
- Input(),
2716
- __metadata("design:type", String)
2717
- ], TextBoxContainerComponent.prototype, "id", void 0);
2718
- __decorate([
2719
- Input(),
2720
- __metadata("design:type", String)
2721
- ], TextBoxContainerComponent.prototype, "floatingLabel", void 0);
2722
- __decorate([
2723
- ContentChild(KendoInput, { static: false }),
2724
- __metadata("design:type", Object)
2725
- ], TextBoxContainerComponent.prototype, "kendoInput", void 0);
2726
- __decorate([
2727
- ContentChild(TextAreaDirective, { static: false }),
2728
- __metadata("design:type", TextAreaDirective)
2729
- ], TextBoxContainerComponent.prototype, "textarea", void 0);
2730
- __decorate([
2731
- ContentChild(NgControl, { static: false }),
2732
- __metadata("design:type", NgControl)
2733
- ], TextBoxContainerComponent.prototype, "formControl", void 0);
2734
- TextBoxContainerComponent = __decorate([
2735
- Component({
2736
- selector: 'kendo-textbox-container',
2737
- template: "\n <ng-content></ng-content>\n <label *ngIf=\"floatingLabel\" [for]=\"id\" class=\"k-label\">{{ floatingLabel }}</label>\n "
2738
- }),
2739
- __param(3, Optional()), __param(3, Inject(RTL)),
2740
- __metadata("design:paramtypes", [ElementRef,
2741
- Renderer2,
2742
- ChangeDetectorRef, Boolean])
2743
- ], TextBoxContainerComponent);
2744
- return TextBoxContainerComponent;
2745
- }());
2746
-
2747
- /**
2748
- * Represents the [Kendo UI TextBox directive]({% slug overview_textbox %}) for the Inputs components for Angular.
2749
- * Used to style the textbox of any `input` element.
2750
- *
2751
- * @example
2752
- * ```ts-no-run
2753
- * <input kendoTextBox />
2754
- * <input kendoTextBox type="email" />
2755
- * <input kendoTextBox type="password" />
2756
- * ```
2757
- */
2758
- var TextBoxDirective = /** @class */ (function () {
2759
- function TextBoxDirective(renderer, inputElement, ngZone) {
2760
- this.renderer = renderer;
2761
- this.inputElement = inputElement;
2762
- this.ngZone = ngZone;
2763
- this.hostClass = true;
2764
- /**
2765
- * @hidden
2766
- */
2767
- this.onFocus = new EventEmitter();
2768
- /**
2769
- * @hidden
2770
- */
2771
- this.onBlur = new EventEmitter();
2772
- /**
2773
- * @hidden
2774
- */
2775
- this.onValueChange = new EventEmitter();
2776
- /**
2777
- * @hidden
2778
- */
2779
- this.autoFillStart = new EventEmitter();
2780
- /**
2781
- * @hidden
2782
- */
2783
- this.autoFillEnd = new EventEmitter();
2784
- this.listeners = [];
2785
- }
2786
- TextBoxDirective_1 = TextBoxDirective;
2787
- Object.defineProperty(TextBoxDirective.prototype, "value", {
2788
- /**
2789
- * @hidden
2790
- */
2791
- get: function () {
2792
- return this.inputElement.nativeElement.value;
2793
- },
2794
- /**
2795
- * @hidden
2796
- */
2797
- set: function (text) {
2798
- if (!this.inputElement) {
2799
- return;
2800
- }
2801
- this.inputElement.nativeElement.value = (text === undefined || text === null) ? '' : text;
2802
- this.onValueChange.emit();
2803
- },
2804
- enumerable: true,
2805
- configurable: true
2806
- });
2807
- Object.defineProperty(TextBoxDirective.prototype, "id", {
2808
- get: function () {
2809
- return this.inputElement.nativeElement.id;
2810
- },
2811
- set: function (id) {
2812
- this.renderer.setAttribute(this.inputElement.nativeElement, 'id', id);
2813
- },
2814
- enumerable: true,
2815
- configurable: true
2816
- });
2817
- TextBoxDirective.prototype.ngAfterViewInit = function () {
2818
- var _this = this;
2819
- var input = this.inputElement.nativeElement;
2820
- this.listeners = [
2821
- this.renderer.listen(input, 'focus', function () { return _this.onFocus.emit(); }),
2822
- this.renderer.listen(input, 'blur', function () { return _this.onBlur.emit(); })
2823
- ];
2824
- this.ngZone.runOutsideAngular(function () {
2825
- _this.renderer.listen(input, 'animationstart', function (e) {
2826
- if (e.animationName === 'autoFillStart') {
2827
- _this.autoFillStart.emit();
2828
- }
2829
- else if (e.animationName === 'autoFillEnd') {
2830
- _this.autoFillEnd.emit();
2831
- }
2832
- });
2833
- });
2834
- };
2835
- TextBoxDirective.prototype.ngOnDestroy = function () {
2836
- this.listeners.forEach(function (listener) { return listener(); });
2837
- };
2838
- var TextBoxDirective_1;
2839
- __decorate([
2840
- HostBinding('class.k-textbox'),
2841
- __metadata("design:type", Boolean)
2842
- ], TextBoxDirective.prototype, "hostClass", void 0);
2843
- __decorate([
2844
- Input(),
2845
- __metadata("design:type", String),
2846
- __metadata("design:paramtypes", [String])
2847
- ], TextBoxDirective.prototype, "value", null);
2848
- TextBoxDirective = TextBoxDirective_1 = __decorate([
2849
- Directive({
2850
- selector: 'input[kendoTextBox]',
2851
- providers: [{
2852
- provide: KendoInput,
2853
- useExisting: forwardRef(function () { return TextBoxDirective_1; })
2854
- }]
2855
- }),
2856
- __metadata("design:paramtypes", [Renderer2,
2857
- ElementRef,
2858
- NgZone])
2859
- ], TextBoxDirective);
2860
- return TextBoxDirective;
2861
- }());
2862
-
2863
- /**
2864
- * @hidden
2865
- */
2866
- var createMaxValidator = function (maxValue) {
2867
- return function (c) {
2868
- if (!isPresent(maxValue) || !isPresent(c.value) || c.value <= maxValue) {
2869
- return null;
2870
- }
2871
- return {
2872
- maxError: {
2873
- maxValue: maxValue,
2874
- value: c.value
2875
- }
2876
- };
2877
- };
2878
- };
2879
-
2880
- /**
2881
- * @hidden
2882
- */
2883
- var createMinValidator = function (minValue) {
2884
- return function (c) {
2885
- if (!isPresent(minValue) || !isPresent(c.value) || c.value >= minValue) {
2886
- return null;
2887
- }
2888
- return {
2889
- minError: {
2890
- minValue: minValue,
2891
- value: c.value
2892
- }
2893
- };
2894
- };
2895
- };
2814
+ };
2815
+ };
2816
+ };
2896
2817
 
2897
2818
  /**
2898
2819
  * @hidden
@@ -3023,8 +2944,7 @@ var PARSABLE_DEFAULTS = {
3023
2944
  min: null,
3024
2945
  step: 1
3025
2946
  };
3026
- var FOCUSED$1 = 'k-state-focused';
3027
- var FORMATTED_VALUE = 'k-formatted-value';
2947
+ var FOCUSED$1 = 'k-focus';
3028
2948
  /**
3029
2949
  * Represents the [Kendo UI NumericTextBox component for Angular]({% slug overview_numerictextbox %}).
3030
2950
  */
@@ -3120,15 +3040,20 @@ var NumericTextBoxComponent = /** @class */ (function () {
3120
3040
  * @hidden
3121
3041
  */
3122
3042
  this.arrowDirection = ArrowDirection.None;
3043
+ this.hostClasses = true;
3123
3044
  this.inputValue = '';
3124
3045
  this.minValidateFn = noop;
3125
3046
  this.maxValidateFn = noop;
3126
3047
  this._format = "n2";
3127
3048
  this.isPasted = false;
3128
3049
  this.mouseDown = false;
3050
+ this._size = 'medium';
3051
+ this._rounded = 'medium';
3052
+ this._fillMode = 'solid';
3129
3053
  this.ngChange = noop;
3130
3054
  this.ngTouched = noop;
3131
3055
  this.ngValidatorChange = noop;
3056
+ this.domEvents = [];
3132
3057
  /**
3133
3058
  * @hidden
3134
3059
  */
@@ -3323,9 +3248,69 @@ var NumericTextBoxComponent = /** @class */ (function () {
3323
3248
  enumerable: true,
3324
3249
  configurable: true
3325
3250
  });
3326
- Object.defineProperty(NumericTextBoxComponent.prototype, "widgetClasses", {
3251
+ Object.defineProperty(NumericTextBoxComponent.prototype, "size", {
3327
3252
  get: function () {
3328
- return true;
3253
+ return this._size;
3254
+ },
3255
+ /**
3256
+ * The size property specifies the font size and line height of the NumericTextBox
3257
+ * ([see example]({% slug appearance_numerictextbox %}#toc-size)).
3258
+ * The possible values are:
3259
+ * * `'small'`
3260
+ * * `'medium'` (default)
3261
+ * * `'large'`
3262
+ * * `null`
3263
+ */
3264
+ set: function (size) {
3265
+ this.handleClasses(size, 'size');
3266
+ this._size = size;
3267
+ },
3268
+ enumerable: true,
3269
+ configurable: true
3270
+ });
3271
+ Object.defineProperty(NumericTextBoxComponent.prototype, "rounded", {
3272
+ get: function () {
3273
+ return this._rounded;
3274
+ },
3275
+ /**
3276
+ * The rounded property specifies the border radius of the NumericTextBox
3277
+ * ([see example]({% slug appearance_numerictextbox %}#toc-rounded)).
3278
+ * The possible values are:
3279
+ * * `'small'`
3280
+ * * `'medium'` (default)
3281
+ * * `'large'`
3282
+ * * `null`
3283
+ */
3284
+ set: function (rounded) {
3285
+ this.handleClasses(rounded, 'rounded');
3286
+ this._rounded = rounded;
3287
+ },
3288
+ enumerable: true,
3289
+ configurable: true
3290
+ });
3291
+ Object.defineProperty(NumericTextBoxComponent.prototype, "fillMode", {
3292
+ get: function () {
3293
+ return this._fillMode;
3294
+ },
3295
+ /**
3296
+ * The fillMode property specifies the background and border styles of the NumericTextBox
3297
+ * ([see example]({% slug appearance_numerictextbox %}#toc-fillMode)).
3298
+ * The possible values are:
3299
+ * * `'flat'`
3300
+ * * `'solid'` (default)
3301
+ * * `'outline'`
3302
+ * * `null`
3303
+ */
3304
+ set: function (fillMode) {
3305
+ this.handleClasses(fillMode, 'fillMode');
3306
+ this._fillMode = fillMode;
3307
+ },
3308
+ enumerable: true,
3309
+ configurable: true
3310
+ });
3311
+ Object.defineProperty(NumericTextBoxComponent.prototype, "disableClass", {
3312
+ get: function () {
3313
+ return this.disabled;
3329
3314
  },
3330
3315
  enumerable: true,
3331
3316
  configurable: true
@@ -3343,6 +3328,17 @@ var NumericTextBoxComponent = /** @class */ (function () {
3343
3328
  this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
3344
3329
  }
3345
3330
  this.control = this.injector.get(NgControl, null);
3331
+ this.ngZone.runOutsideAngular(function () {
3332
+ _this.domEvents.push(_this.renderer.listen(_this.hostElement.nativeElement, 'mousewheel', _this.handleWheel.bind(_this)));
3333
+ _this.domEvents.push(_this.renderer.listen(_this.hostElement.nativeElement, 'DOMMouseScroll', _this.handleWheel.bind(_this)));
3334
+ });
3335
+ };
3336
+ NumericTextBoxComponent.prototype.ngAfterViewInit = function () {
3337
+ var _this = this;
3338
+ var stylingInputs = ['size', 'rounded', 'fillMode'];
3339
+ stylingInputs.forEach(function (input) {
3340
+ _this.handleClasses(_this[input], input);
3341
+ });
3346
3342
  };
3347
3343
  /**
3348
3344
  * @hidden
@@ -3376,6 +3372,7 @@ var NumericTextBoxComponent = /** @class */ (function () {
3376
3372
  this.subscriptions.unsubscribe();
3377
3373
  }
3378
3374
  clearTimeout(this.spinTimeout);
3375
+ this.domEvents.forEach(function (unbindHandler) { return unbindHandler(); });
3379
3376
  };
3380
3377
  /**
3381
3378
  * @hidden
@@ -3495,18 +3492,13 @@ var NumericTextBoxComponent = /** @class */ (function () {
3495
3492
  return this.isFocused;
3496
3493
  },
3497
3494
  set: function (value) {
3498
- if (this.isFocused !== value && this.numericWrap) {
3499
- var wrap = this.numericWrap.nativeElement;
3500
- var input = this.numericInput.nativeElement;
3495
+ if (this.isFocused !== value && this.hostElement) {
3496
+ var wrap = this.hostElement.nativeElement;
3501
3497
  if (value) {
3502
3498
  this.renderer.addClass(wrap, FOCUSED$1);
3503
- if (!this.isDisabled) {
3504
- this.renderer.removeClass(input, FORMATTED_VALUE);
3505
- }
3506
3499
  }
3507
3500
  else {
3508
3501
  this.renderer.removeClass(wrap, FOCUSED$1);
3509
- this.renderer.addClass(input, FORMATTED_VALUE);
3510
3502
  }
3511
3503
  this.isFocused = value;
3512
3504
  }
@@ -3815,6 +3807,16 @@ var NumericTextBoxComponent = /** @class */ (function () {
3815
3807
  }
3816
3808
  return significantChars;
3817
3809
  };
3810
+ NumericTextBoxComponent.prototype.handleClasses = function (value, input) {
3811
+ var elem = this.hostElement.nativeElement;
3812
+ var classes = getStylingClasses('input', input, this[input], value);
3813
+ if (classes.toRemove) {
3814
+ this.renderer.removeClass(elem, classes.toRemove);
3815
+ }
3816
+ if (classes.toAdd) {
3817
+ this.renderer.addClass(elem, classes.toAdd);
3818
+ }
3819
+ };
3818
3820
  var NumericTextBoxComponent_1;
3819
3821
  __decorate([
3820
3822
  Input(),
@@ -3894,6 +3896,21 @@ var NumericTextBoxComponent = /** @class */ (function () {
3894
3896
  Input(),
3895
3897
  __metadata("design:type", Number)
3896
3898
  ], NumericTextBoxComponent.prototype, "maxlength", void 0);
3899
+ __decorate([
3900
+ Input(),
3901
+ __metadata("design:type", String),
3902
+ __metadata("design:paramtypes", [String])
3903
+ ], NumericTextBoxComponent.prototype, "size", null);
3904
+ __decorate([
3905
+ Input(),
3906
+ __metadata("design:type", String),
3907
+ __metadata("design:paramtypes", [String])
3908
+ ], NumericTextBoxComponent.prototype, "rounded", null);
3909
+ __decorate([
3910
+ Input(),
3911
+ __metadata("design:type", String),
3912
+ __metadata("design:paramtypes", [String])
3913
+ ], NumericTextBoxComponent.prototype, "fillMode", null);
3897
3914
  __decorate([
3898
3915
  Output(),
3899
3916
  __metadata("design:type", EventEmitter)
@@ -3910,20 +3927,20 @@ var NumericTextBoxComponent = /** @class */ (function () {
3910
3927
  ViewChild('numericInput', { static: true }),
3911
3928
  __metadata("design:type", ElementRef)
3912
3929
  ], NumericTextBoxComponent.prototype, "numericInput", void 0);
3913
- __decorate([
3914
- ViewChild('numericWrap', { static: true }),
3915
- __metadata("design:type", ElementRef)
3916
- ], NumericTextBoxComponent.prototype, "numericWrap", void 0);
3917
3930
  __decorate([
3918
3931
  HostBinding('attr.dir'),
3919
3932
  __metadata("design:type", String)
3920
3933
  ], NumericTextBoxComponent.prototype, "direction", void 0);
3921
3934
  __decorate([
3922
- HostBinding('class.k-widget'),
3923
- HostBinding('class.k-numerictextbox'),
3935
+ HostBinding('class.k-disabled'),
3924
3936
  __metadata("design:type", Boolean),
3925
3937
  __metadata("design:paramtypes", [])
3926
- ], NumericTextBoxComponent.prototype, "widgetClasses", null);
3938
+ ], NumericTextBoxComponent.prototype, "disableClass", null);
3939
+ __decorate([
3940
+ HostBinding('class.k-input'),
3941
+ HostBinding('class.k-numerictextbox'),
3942
+ __metadata("design:type", Boolean)
3943
+ ], NumericTextBoxComponent.prototype, "hostClasses", void 0);
3927
3944
  NumericTextBoxComponent = NumericTextBoxComponent_1 = __decorate([
3928
3945
  Component({
3929
3946
  exportAs: 'kendoNumericTextBox',
@@ -3935,7 +3952,7 @@ var NumericTextBoxComponent = /** @class */ (function () {
3935
3952
  { provide: KendoInput, useExisting: forwardRef(function () { return NumericTextBoxComponent_1; }) }
3936
3953
  ],
3937
3954
  selector: 'kendo-numerictextbox',
3938
- template: "\n <ng-container kendoNumericTextBoxLocalizedMessages\n i18n-increment=\"kendo.numerictextbox.increment|The title for the **Increment** button in the NumericTextBox\"\n increment=\"Increase value\"\n i18n-decrement=\"kendo.numerictextbox.decrement|The title for the **Decrement** button in the NumericTextBox\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <span\n class=\"k-numeric-wrap\"\n [class.k-state-disabled]=\"disabled\"\n [kendoEventsOutsideAngular]=\"{ mousewheel: handleWheel, DOMMouseScroll: handleWheel }\"\n #numericWrap>\n <input\n role=\"spinbutton\"\n class=\"k-input k-formatted-value\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n [id]=\"focusableId\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuenow]=\"value\"\n [attr.title]=\"title\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxLength]=\"maxlength\"\n [tabindex]=\"tabIndex\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: handleMouseDown,\n dragenter: handleDragEnter,\n keydown: handleKeyDown,\n input: handleInput,\n focus: handleFocus,\n blur: handleBlur,\n paste: handlePaste\n }\"\n #numericInput />\n <span class=\"k-select\" *ngIf=\"spinners\" [kendoEventsOutsideAngular]=\"{ mouseup: releaseArrow, mouseleave: releaseArrow }\">\n <span\n role=\"button\"\n [kendoEventsOutsideAngular]=\"{ mousedown: increasePress }\"\n [attr.aria-label]=\"incrementTitle\"\n [title]=\"incrementTitle\"\n [class.k-state-active]=\"arrowDirection === ArrowDirection.Up\"\n class=\"k-link k-link-increase\"\n >\n <span class=\"k-icon k-i-arrow-n\"></span>\n </span>\n <span\n role=\"button\"\n [kendoEventsOutsideAngular]=\"{ mousedown: decreasePress }\"\n [attr.aria-label]=\"decrementTitle\"\n [title]=\"decrementTitle\"\n [class.k-state-active]=\"arrowDirection === ArrowDirection.Down\"\n class=\"k-link k-link-decrease\"\n >\n <span class=\"k-icon k-i-arrow-s\"></span>\n </span>\n </span>\n </span>\n "
3955
+ template: "\n <ng-container kendoNumericTextBoxLocalizedMessages\n i18n-increment=\"kendo.numerictextbox.increment|The title for the **Increment** button in the NumericTextBox\"\n increment=\"Increase value\"\n i18n-decrement=\"kendo.numerictextbox.decrement|The title for the **Decrement** button in the NumericTextBox\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <input\n role=\"spinbutton\"\n class=\"k-input-inner\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n [id]=\"focusableId\"\n [attr.aria-valuemin]=\"min\"\n [attr.aria-valuemax]=\"max\"\n [attr.aria-valuenow]=\"value\"\n [attr.title]=\"title\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxLength]=\"maxlength\"\n [tabindex]=\"tabIndex\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: handleMouseDown,\n dragenter: handleDragEnter,\n keydown: handleKeyDown,\n input: handleInput,\n focus: handleFocus,\n blur: handleBlur,\n paste: handlePaste\n }\"\n #numericInput />\n <span\n class=\"k-input-spinner k-spin-button\" *ngIf=\"spinners\"\n [kendoEventsOutsideAngular]=\"{ mouseup: releaseArrow, mouseleave: releaseArrow }\"\n >\n <button\n type=\"button\"\n [kendoEventsOutsideAngular]=\"{ mousedown: increasePress }\"\n [attr.aria-hidden]=\"true\"\n [attr.aria-label]=\"incrementTitle\"\n [title]=\"incrementTitle\"\n [class.k-active]=\"arrowDirection === ArrowDirection.Up\"\n class=\"k-spinner-increase k-button k-icon-button k-button-solid k-button-solid-base\"\n tabindex=\"-1\"\n >\n <span class=\"k-button-icon k-icon k-i-arrow-n\"></span>\n </button>\n <button\n type=\"button\"\n [kendoEventsOutsideAngular]=\"{ mousedown: decreasePress }\"\n [attr.aria-hidden]=\"true\"\n [attr.aria-label]=\"decrementTitle\"\n [title]=\"decrementTitle\"\n [class.k-active]=\"arrowDirection === ArrowDirection.Down\"\n class=\"k-spinner-decrease k-button k-icon-button k-button-solid k-button-solid-base\"\n tabindex=\"-1\"\n >\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n </span>\n "
3939
3956
  }),
3940
3957
  __metadata("design:paramtypes", [IntlService,
3941
3958
  Renderer2,
@@ -4465,7 +4482,7 @@ var MaskingService = /** @class */ (function () {
4465
4482
  }());
4466
4483
 
4467
4484
  var resolvedPromise = Promise.resolve(null);
4468
- var FOCUSED$2 = 'k-state-focused';
4485
+ var FOCUSED$2 = 'k-focus';
4469
4486
  /**
4470
4487
  * Represents the [Kendo UI MaskedTextBox component for Angular]({% slug overview_maskedtextbox %}).
4471
4488
  *
@@ -4599,6 +4616,9 @@ var MaskedTextBoxComponent = /** @class */ (function () {
4599
4616
  };
4600
4617
  this.isPasted = false;
4601
4618
  this.selection = [0, 0];
4619
+ this._size = 'medium';
4620
+ this._rounded = 'medium';
4621
+ this._fillMode = 'solid';
4602
4622
  /**
4603
4623
  * @hidden
4604
4624
  */
@@ -4652,6 +4672,66 @@ var MaskedTextBoxComponent = /** @class */ (function () {
4652
4672
  this.updateService();
4653
4673
  }
4654
4674
  MaskedTextBoxComponent_1 = MaskedTextBoxComponent;
4675
+ Object.defineProperty(MaskedTextBoxComponent.prototype, "size", {
4676
+ get: function () {
4677
+ return this._size;
4678
+ },
4679
+ /**
4680
+ * The size property specifies the font size and line height of the MaskedTextBox
4681
+ * ([see example]({% slug appearance_maskedtextbox %}#toc-size)).
4682
+ * The possible values are:
4683
+ * * `'small'`
4684
+ * * `'medium'` (default)
4685
+ * * `'large'`
4686
+ * * `null`
4687
+ */
4688
+ set: function (size) {
4689
+ this.handleClasses(size, 'size');
4690
+ this._size = size;
4691
+ },
4692
+ enumerable: true,
4693
+ configurable: true
4694
+ });
4695
+ Object.defineProperty(MaskedTextBoxComponent.prototype, "rounded", {
4696
+ get: function () {
4697
+ return this._rounded;
4698
+ },
4699
+ /**
4700
+ * The rounded property specifies the border radius of the MaskedTextBox
4701
+ * ([see example]({% slug appearance_maskedtextbox %}#toc-rounded)).
4702
+ * The possible values are:
4703
+ * * `'small'`
4704
+ * * `'medium'` (default)
4705
+ * * `'large'`
4706
+ * * `null`
4707
+ */
4708
+ set: function (rounded) {
4709
+ this.handleClasses(rounded, 'rounded');
4710
+ this._rounded = rounded;
4711
+ },
4712
+ enumerable: true,
4713
+ configurable: true
4714
+ });
4715
+ Object.defineProperty(MaskedTextBoxComponent.prototype, "fillMode", {
4716
+ get: function () {
4717
+ return this._fillMode;
4718
+ },
4719
+ /**
4720
+ * The fillMode property specifies the background and border styles of the MaskedTexBox
4721
+ * ([see example]({% slug appearance_maskedtextbox %}#toc-fillMode)).
4722
+ * The possible values are:
4723
+ * * `flat`
4724
+ * * `solid` (default)
4725
+ * * `outline`
4726
+ * * `null`
4727
+ */
4728
+ set: function (fillMode) {
4729
+ this.handleClasses(fillMode, 'fillMode');
4730
+ this._fillMode = fillMode;
4731
+ },
4732
+ enumerable: true,
4733
+ configurable: true
4734
+ });
4655
4735
  Object.defineProperty(MaskedTextBoxComponent.prototype, "hostDisabledClass", {
4656
4736
  get: function () {
4657
4737
  return this.disabled;
@@ -4691,9 +4771,16 @@ var MaskedTextBoxComponent = /** @class */ (function () {
4691
4771
  }
4692
4772
  this.control = this.injector.get(NgControl, null);
4693
4773
  };
4774
+ MaskedTextBoxComponent.prototype.ngAfterViewInit = function () {
4775
+ var _this = this;
4776
+ var stylingInputs = ['size', 'rounded', 'fillMode'];
4777
+ stylingInputs.forEach(function (input) {
4778
+ _this.handleClasses(_this[input], input);
4779
+ });
4780
+ };
4694
4781
  /**
4695
4782
  * @hidden
4696
- * Used by the TextBoxContainer to determine if the MaskedTextBox is empty.
4783
+ * Used by the FloatingLabel to determine if the MaskedTextBox is empty.
4697
4784
  */
4698
4785
  MaskedTextBoxComponent.prototype.isEmpty = function () {
4699
4786
  if (this.input) {
@@ -4945,6 +5032,16 @@ var MaskedTextBoxComponent = /** @class */ (function () {
4945
5032
  }
4946
5033
  return present ? value : '';
4947
5034
  };
5035
+ MaskedTextBoxComponent.prototype.handleClasses = function (value, input) {
5036
+ var elem = this.hostElement.nativeElement;
5037
+ var classes = getStylingClasses('input', input, this[input], value);
5038
+ if (classes.toRemove) {
5039
+ this.renderer.removeClass(elem, classes.toRemove);
5040
+ }
5041
+ if (classes.toAdd) {
5042
+ this.renderer.addClass(elem, classes.toAdd);
5043
+ }
5044
+ };
4948
5045
  var MaskedTextBoxComponent_1;
4949
5046
  __decorate([
4950
5047
  Input(),
@@ -4962,17 +5059,32 @@ var MaskedTextBoxComponent = /** @class */ (function () {
4962
5059
  Input(),
4963
5060
  __metadata("design:type", String)
4964
5061
  ], MaskedTextBoxComponent.prototype, "title", void 0);
5062
+ __decorate([
5063
+ Input(),
5064
+ __metadata("design:type", String),
5065
+ __metadata("design:paramtypes", [String])
5066
+ ], MaskedTextBoxComponent.prototype, "size", null);
5067
+ __decorate([
5068
+ Input(),
5069
+ __metadata("design:type", String),
5070
+ __metadata("design:paramtypes", [String])
5071
+ ], MaskedTextBoxComponent.prototype, "rounded", null);
5072
+ __decorate([
5073
+ Input(),
5074
+ __metadata("design:type", String),
5075
+ __metadata("design:paramtypes", [String])
5076
+ ], MaskedTextBoxComponent.prototype, "fillMode", null);
4965
5077
  __decorate([
4966
5078
  HostBinding('attr.dir'),
4967
5079
  __metadata("design:type", String)
4968
5080
  ], MaskedTextBoxComponent.prototype, "direction", void 0);
4969
5081
  __decorate([
4970
- HostBinding('class.k-widget'),
5082
+ HostBinding('class.k-input'),
4971
5083
  HostBinding('class.k-maskedtextbox'),
4972
5084
  __metadata("design:type", Boolean)
4973
5085
  ], MaskedTextBoxComponent.prototype, "hostClasses", void 0);
4974
5086
  __decorate([
4975
- HostBinding('class.k-state-disabled'),
5087
+ HostBinding('class.k-disabled'),
4976
5088
  __metadata("design:type", Boolean),
4977
5089
  __metadata("design:paramtypes", [])
4978
5090
  ], MaskedTextBoxComponent.prototype, "hostDisabledClass", null);
@@ -5067,7 +5179,7 @@ var MaskedTextBoxComponent = /** @class */ (function () {
5067
5179
  }
5068
5180
  ],
5069
5181
  selector: 'kendo-maskedtextbox',
5070
- template: "\n <input type=\"text\"\n #input\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"k-textbox\"\n [id]=\"focusableId\"\n [tabindex]=\"tabIndex\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleFocus,\n blur: handleBlur,\n click: handleClick,\n dragstart: handleDragDrop,\n drop: handleDragDrop\n }\"\n />\n "
5182
+ template: "\n <input type=\"text\"\n #input\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"k-input-inner\"\n [id]=\"focusableId\"\n [tabindex]=\"tabIndex\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleFocus,\n blur: handleBlur,\n click: handleClick,\n dragstart: handleDragDrop,\n drop: handleDragDrop\n }\"\n />\n "
5071
5183
  }),
5072
5184
  __param(6, Optional()), __param(6, Inject(RTL)),
5073
5185
  __metadata("design:paramtypes", [MaskingService,
@@ -5817,7 +5929,7 @@ var TextBoxPrefixTemplateDirective = /** @class */ (function () {
5817
5929
  return TextBoxPrefixTemplateDirective;
5818
5930
  }());
5819
5931
 
5820
- var FOCUSED$3 = 'k-state-focused';
5932
+ var FOCUSED$3 = 'k-focus';
5821
5933
  var TextBoxComponent = /** @class */ (function () {
5822
5934
  function TextBoxComponent(localizationService, ngZone, changeDetector, renderer, injector, hostElement) {
5823
5935
  var _this = this;
@@ -5952,9 +6064,12 @@ var TextBoxComponent = /** @class */ (function () {
5952
6064
  * ```
5953
6065
  */
5954
6066
  this.onBlur = new EventEmitter();
5955
- this.hostClass = true;
6067
+ this.hostClasses = true;
5956
6068
  this._isFocused = false;
5957
6069
  this.focusChangedProgrammatically = false;
6070
+ this._size = 'medium';
6071
+ this._rounded = 'medium';
6072
+ this._fillMode = 'solid';
5958
6073
  /**
5959
6074
  * @hidden
5960
6075
  */
@@ -6009,6 +6124,70 @@ var TextBoxComponent = /** @class */ (function () {
6009
6124
  this.direction = localizationService.rtl ? 'rtl' : 'ltr';
6010
6125
  }
6011
6126
  TextBoxComponent_1 = TextBoxComponent;
6127
+ Object.defineProperty(TextBoxComponent.prototype, "size", {
6128
+ get: function () {
6129
+ return this._size;
6130
+ },
6131
+ /**
6132
+ * The size property specifies the font size and line height of the TextBox
6133
+ * ([see example]({% slug appearance_textbox %}#toc-size)).
6134
+ *
6135
+ * The possible values are:
6136
+ * * `'small'`
6137
+ * * `'medium'` (default)
6138
+ * * `'large'`
6139
+ * * `null`
6140
+ */
6141
+ set: function (size) {
6142
+ this.handleClasses(size, 'size');
6143
+ this._size = size;
6144
+ },
6145
+ enumerable: true,
6146
+ configurable: true
6147
+ });
6148
+ Object.defineProperty(TextBoxComponent.prototype, "rounded", {
6149
+ get: function () {
6150
+ return this._rounded;
6151
+ },
6152
+ /**
6153
+ * The rounded property specifies the border radius of the TextBox
6154
+ * ([see example]({% slug appearance_textbox %}#toc-rounded)).
6155
+ *
6156
+ * The possible values are:
6157
+ * * `'small'`
6158
+ * * `'medium'` (default)
6159
+ * * `'large'`
6160
+ * * `'full'`
6161
+ * * `null`
6162
+ */
6163
+ set: function (rounded) {
6164
+ this.handleClasses(rounded, 'rounded');
6165
+ this._rounded = rounded;
6166
+ },
6167
+ enumerable: true,
6168
+ configurable: true
6169
+ });
6170
+ Object.defineProperty(TextBoxComponent.prototype, "fillMode", {
6171
+ get: function () {
6172
+ return this._fillMode;
6173
+ },
6174
+ /**
6175
+ * The fillMode property specifies the background and border styles of the TextBox
6176
+ * ([see example]({% slug appearance_textbox %}#toc-fillMode)).
6177
+ *
6178
+ * The possible values are:
6179
+ * * `'flat'`
6180
+ * * `'solid'` (default)
6181
+ * * `'outline'`
6182
+ * * `null`
6183
+ */
6184
+ set: function (fillMode) {
6185
+ this.handleClasses(fillMode, 'fillMode');
6186
+ this._fillMode = fillMode;
6187
+ },
6188
+ enumerable: true,
6189
+ configurable: true
6190
+ });
6012
6191
  Object.defineProperty(TextBoxComponent.prototype, "tabIndex", {
6013
6192
  get: function () {
6014
6193
  return this.tabindex;
@@ -6058,7 +6237,7 @@ var TextBoxComponent = /** @class */ (function () {
6058
6237
  return;
6059
6238
  }
6060
6239
  if (tabbing) {
6061
- var closestTextbox = closest(args.relatedTarget, function (element) { return element === _this.hostElement.nativeElement; });
6240
+ var closestTextbox = closest$1(args.relatedTarget, function (element) { return element === _this.hostElement.nativeElement; });
6062
6241
  if (!closestTextbox) {
6063
6242
  _this.handleBlur();
6064
6243
  }
@@ -6085,6 +6264,10 @@ var TextBoxComponent = /** @class */ (function () {
6085
6264
  }
6086
6265
  }));
6087
6266
  });
6267
+ var stylingInputs = ['size', 'rounded', 'fillMode'];
6268
+ stylingInputs.forEach(function (input) {
6269
+ _this.handleClasses(_this[input], input);
6270
+ });
6088
6271
  };
6089
6272
  TextBoxComponent.prototype.ngOnChanges = function (changes) {
6090
6273
  if (changes.disabled || changes.readonly || changes.value) {
@@ -6218,8 +6401,8 @@ var TextBoxComponent = /** @class */ (function () {
6218
6401
  */
6219
6402
  get: function () {
6220
6403
  return this.successIcon
6221
- ? "k-text-success " + this.successIcon
6222
- : "k-text-success k-icon k-i-check-outline";
6404
+ ? "" + this.successIcon
6405
+ : "k-validation-icon k-icon k-i-check";
6223
6406
  },
6224
6407
  enumerable: true,
6225
6408
  configurable: true
@@ -6230,8 +6413,8 @@ var TextBoxComponent = /** @class */ (function () {
6230
6413
  */
6231
6414
  get: function () {
6232
6415
  return this.errorIcon
6233
- ? "k-text-error " + this.errorIcon
6234
- : "k-text-error k-icon k-i-warning";
6416
+ ? "" + this.errorIcon
6417
+ : "k-validation-icon k-icon k-i-warning";
6235
6418
  },
6236
6419
  enumerable: true,
6237
6420
  configurable: true
@@ -6243,7 +6426,7 @@ var TextBoxComponent = /** @class */ (function () {
6243
6426
  get: function () {
6244
6427
  return this.clearButtonIcon
6245
6428
  ? this.clearButtonIcon
6246
- : "k-icon k-i-close-circle";
6429
+ : "k-icon k-i-x";
6247
6430
  },
6248
6431
  enumerable: true,
6249
6432
  configurable: true
@@ -6322,6 +6505,16 @@ var TextBoxComponent = /** @class */ (function () {
6322
6505
  _this.isFocused = false;
6323
6506
  });
6324
6507
  };
6508
+ TextBoxComponent.prototype.handleClasses = function (value, input) {
6509
+ var elem = this.hostElement.nativeElement;
6510
+ var classes = getStylingClasses('input', input, this[input], value);
6511
+ if (classes.toRemove) {
6512
+ this.renderer.removeClass(elem, classes.toRemove);
6513
+ }
6514
+ if (classes.toAdd) {
6515
+ this.renderer.addClass(elem, classes.toAdd);
6516
+ }
6517
+ };
6325
6518
  var TextBoxComponent_1;
6326
6519
  __decorate([
6327
6520
  Input(),
@@ -6375,6 +6568,21 @@ var TextBoxComponent = /** @class */ (function () {
6375
6568
  Input(),
6376
6569
  __metadata("design:type", String)
6377
6570
  ], TextBoxComponent.prototype, "clearButtonIcon", void 0);
6571
+ __decorate([
6572
+ Input(),
6573
+ __metadata("design:type", String),
6574
+ __metadata("design:paramtypes", [String])
6575
+ ], TextBoxComponent.prototype, "size", null);
6576
+ __decorate([
6577
+ Input(),
6578
+ __metadata("design:type", String),
6579
+ __metadata("design:paramtypes", [String])
6580
+ ], TextBoxComponent.prototype, "rounded", null);
6581
+ __decorate([
6582
+ Input(),
6583
+ __metadata("design:type", String),
6584
+ __metadata("design:paramtypes", [String])
6585
+ ], TextBoxComponent.prototype, "fillMode", null);
6378
6586
  __decorate([
6379
6587
  Input(),
6380
6588
  __metadata("design:type", Number),
@@ -6421,14 +6629,15 @@ var TextBoxComponent = /** @class */ (function () {
6421
6629
  __metadata("design:type", TextBoxPrefixTemplateDirective)
6422
6630
  ], TextBoxComponent.prototype, "prefixTemplate", void 0);
6423
6631
  __decorate([
6424
- HostBinding('class.k-state-disabled'),
6632
+ HostBinding('class.k-disabled'),
6425
6633
  __metadata("design:type", Boolean),
6426
6634
  __metadata("design:paramtypes", [])
6427
6635
  ], TextBoxComponent.prototype, "disabledClass", null);
6428
6636
  __decorate([
6429
6637
  HostBinding('class.k-textbox'),
6638
+ HostBinding('class.k-input'),
6430
6639
  __metadata("design:type", Boolean)
6431
- ], TextBoxComponent.prototype, "hostClass", void 0);
6640
+ ], TextBoxComponent.prototype, "hostClasses", void 0);
6432
6641
  __decorate([
6433
6642
  HostBinding('attr.dir'),
6434
6643
  __metadata("design:type", String)
@@ -6447,7 +6656,7 @@ var TextBoxComponent = /** @class */ (function () {
6447
6656
  { provide: KendoInput, useExisting: forwardRef(function () { return TextBoxComponent_1; }) }
6448
6657
  ],
6449
6658
  selector: 'kendo-textbox',
6450
- template: "\n <ng-container kendoTextBoxLocalizedMessages\n i18n-clear=\"kendo.textbox.clear|The title for the **Clear** button in the TextBox.\"\n clear=\"Clear\">\n </ng-container>\n <span class=\"k-input-prefix\">\n <ng-template\n *ngIf=\"prefixTemplate\"\n [ngTemplateOutlet]=\"prefixTemplate?.templateRef\">\n </ng-template>\n </span>\n <input\n class=\"k-input\"\n #input\n [id]=\"focusableId\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.tabindex]=\"disabled ? undefined : tabindex\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\"/>\n <span class=\"k-input-suffix\">\n <span *ngIf=\"hasErrors\" [ngClass]=\"errorIconClasses\"></span>\n <span *ngIf=\"isSuccessful\" [ngClass]=\"successIconClasses\"></span>\n <span\n role=\"button\"\n class=\"k-clear-value\"\n *ngIf=\"showClearButton\"\n (click)=\"clearValue()\"\n (mousedown)=\"$event.preventDefault()\"\n [tabindex]=\"tabIndex\"\n [attr.aria-label]=\"clearTitle()\"\n [title]=\"clearTitle()\"\n (keydown.enter)=\"clearValue($event)\"\n (keydown.space)=\"clearValue($event)\"\n >\n <span [ngClass]=\"clearButtonClasses\"></span>\n </span>\n <ng-template\n *ngIf=\"suffixTemplate\"\n [ngTemplateOutlet]=\"suffixTemplate?.templateRef\">\n </ng-template>\n </span>\n "
6659
+ template: "\n <ng-container kendoTextBoxLocalizedMessages\n i18n-clear=\"kendo.textbox.clear|The title for the **Clear** button in the TextBox.\"\n clear=\"Clear\">\n </ng-container>\n <span class=\"k-input-prefix\">\n <ng-template\n *ngIf=\"prefixTemplate\"\n [ngTemplateOutlet]=\"prefixTemplate?.templateRef\">\n </ng-template>\n </span>\n <input #input\n class=\"k-input-inner\"\n [id]=\"focusableId\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.tabindex]=\"disabled ? undefined : tabindex\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\"\n />\n <span\n role=\"button\"\n class=\"k-clear-value\"\n *ngIf=\"showClearButton\"\n (click)=\"clearValue()\"\n (mousedown)=\"$event.preventDefault()\"\n [tabindex]=\"tabIndex\"\n [attr.aria-label]=\"clearTitle()\"\n [title]=\"clearTitle()\"\n (keydown.enter)=\"clearValue($event)\"\n (keydown.space)=\"clearValue($event)\">\n <span [ngClass]=\"clearButtonClasses\"></span>\n </span>\n <span *ngIf=\"hasErrors\" [ngClass]=\"errorIconClasses\"></span>\n <span *ngIf=\"isSuccessful\" [ngClass]=\"successIconClasses\"></span>\n <span class=\"k-input-suffix\">\n <ng-template\n *ngIf=\"suffixTemplate\"\n [ngTemplateOutlet]=\"suffixTemplate?.templateRef\">\n </ng-template>\n </span>\n "
6451
6660
  }),
6452
6661
  __metadata("design:paramtypes", [LocalizationService,
6453
6662
  NgZone,
@@ -6631,7 +6840,6 @@ var TextBoxModule = /** @class */ (function () {
6631
6840
  NgModule({
6632
6841
  declarations: [
6633
6842
  TextBoxDirective,
6634
- TextBoxContainerComponent,
6635
6843
  TextBoxComponent,
6636
6844
  TextBoxSuffixTemplateDirective,
6637
6845
  TextBoxPrefixTemplateDirective,
@@ -6640,7 +6848,6 @@ var TextBoxModule = /** @class */ (function () {
6640
6848
  ],
6641
6849
  exports: [
6642
6850
  TextBoxDirective,
6643
- TextBoxContainerComponent,
6644
6851
  TextBoxComponent,
6645
6852
  TextBoxSuffixTemplateDirective,
6646
6853
  TextBoxPrefixTemplateDirective,
@@ -6779,7 +6986,7 @@ var TextFieldsBase = /** @class */ (function () {
6779
6986
  __metadata("design:type", ElementRef)
6780
6987
  ], TextFieldsBase.prototype, "input", void 0);
6781
6988
  __decorate([
6782
- HostBinding('class.k-state-disabled'),
6989
+ HostBinding('class.k-disabled'),
6783
6990
  __metadata("design:type", Boolean),
6784
6991
  __metadata("design:paramtypes", [])
6785
6992
  ], TextFieldsBase.prototype, "disabledClass", null);
@@ -6797,7 +7004,7 @@ var resizeClasses = {
6797
7004
  'none': 'k-resize-none',
6798
7005
  'auto': 'k-resize-none'
6799
7006
  };
6800
- var FOCUSED$4 = 'k-state-focus';
7007
+ var FOCUSED$4 = 'k-focus';
6801
7008
  /**
6802
7009
  * Represents the [Kendo UI TextArea component for Angular]({% slug overview_textarea %}).
6803
7010
  */
@@ -6815,7 +7022,7 @@ var TextAreaComponent = /** @class */ (function (_super) {
6815
7022
  * @hidden
6816
7023
  */
6817
7024
  _this.focusableId = "k-" + guid();
6818
- _this.hostClass = true;
7025
+ _this.hostClasses = true;
6819
7026
  /**
6820
7027
  * Specifies the flow direction of the TextArea sections. This property is useful when adornments are used, in order to specify
6821
7028
  * their position in relation to the textarea element.
@@ -6889,6 +7096,9 @@ var TextAreaComponent = /** @class */ (function (_super) {
6889
7096
  * When the component value is changed programmatically or via its form control binding, the valueChange event is not emitted.
6890
7097
  */
6891
7098
  _this.valueChange = new EventEmitter();
7099
+ _this._size = 'medium';
7100
+ _this._rounded = 'medium';
7101
+ _this._fillMode = 'solid';
6892
7102
  /**
6893
7103
  * @hidden
6894
7104
  */
@@ -6958,6 +7168,69 @@ var TextAreaComponent = /** @class */ (function (_super) {
6958
7168
  enumerable: true,
6959
7169
  configurable: true
6960
7170
  });
7171
+ Object.defineProperty(TextAreaComponent.prototype, "size", {
7172
+ get: function () {
7173
+ return this._size;
7174
+ },
7175
+ /**
7176
+ * The size property specifies the font size and line height of the TextArea
7177
+ * ([see example]({% slug appearance_textarea %}#toc-size)).
7178
+ *
7179
+ * The possible values are:
7180
+ * * `'small'`
7181
+ * * `'medium'` (default)
7182
+ * * `'large'`
7183
+ * * `null`
7184
+ */
7185
+ set: function (size) {
7186
+ this.handleClasses(size, 'size');
7187
+ this._size = size;
7188
+ },
7189
+ enumerable: true,
7190
+ configurable: true
7191
+ });
7192
+ Object.defineProperty(TextAreaComponent.prototype, "rounded", {
7193
+ get: function () {
7194
+ return this._rounded;
7195
+ },
7196
+ /**
7197
+ * The rounded property specifies the border radius of the TextArea
7198
+ * ([see example]({% slug appearance_textarea %}#toc-rounded)).
7199
+ *
7200
+ * The possible values are:
7201
+ * * `'small'`
7202
+ * * `'medium'` (default)
7203
+ * * `'large'`
7204
+ * * `null`
7205
+ */
7206
+ set: function (rounded) {
7207
+ this.handleClasses(rounded, 'rounded');
7208
+ this._rounded = rounded;
7209
+ },
7210
+ enumerable: true,
7211
+ configurable: true
7212
+ });
7213
+ Object.defineProperty(TextAreaComponent.prototype, "fillMode", {
7214
+ get: function () {
7215
+ return this._fillMode;
7216
+ },
7217
+ /**
7218
+ * The fillMode property specifies the background and border styles of the TextArea
7219
+ * ([see example]({% slug appearance_textarea %}#toc-fillMode)).
7220
+ *
7221
+ * The possible values are:
7222
+ * * `'flat'`
7223
+ * * `'solid'` (default)
7224
+ * * `'outline'`
7225
+ * * `null`
7226
+ */
7227
+ set: function (fillMode) {
7228
+ this.handleClasses(fillMode, 'fillMode');
7229
+ this._fillMode = fillMode;
7230
+ },
7231
+ enumerable: true,
7232
+ configurable: true
7233
+ });
6961
7234
  TextAreaComponent.prototype.ngAfterViewInit = function () {
6962
7235
  var _this = this;
6963
7236
  var hostElement = this.hostElement.nativeElement;
@@ -6978,7 +7251,7 @@ var TextAreaComponent = /** @class */ (function (_super) {
6978
7251
  return;
6979
7252
  }
6980
7253
  if (tabbing) {
6981
- var closestTextbox = closest(args.relatedTarget, function (element) { return element === _this.hostElement.nativeElement; });
7254
+ var closestTextbox = closest$1(args.relatedTarget, function (element) { return element === _this.hostElement.nativeElement; });
6982
7255
  if (!closestTextbox) {
6983
7256
  _this.handleBlur();
6984
7257
  }
@@ -7005,6 +7278,10 @@ var TextAreaComponent = /** @class */ (function (_super) {
7005
7278
  }
7006
7279
  }));
7007
7280
  });
7281
+ var stylingInputs = ['size', 'rounded', 'fillMode'];
7282
+ stylingInputs.forEach(function (input) {
7283
+ _this.handleClasses(_this[input], input);
7284
+ });
7008
7285
  };
7009
7286
  TextAreaComponent.prototype.ngOnInit = function () {
7010
7287
  var _this = this;
@@ -7178,6 +7455,16 @@ var TextAreaComponent = /** @class */ (function (_super) {
7178
7455
  this.setSelection(0, this.value.length);
7179
7456
  }
7180
7457
  };
7458
+ TextAreaComponent.prototype.handleClasses = function (value, input) {
7459
+ var elem = this.hostElement.nativeElement;
7460
+ var classes = getStylingClasses('input', input, this[input], value);
7461
+ if (classes.toRemove) {
7462
+ this.renderer.removeClass(elem, classes.toRemove);
7463
+ }
7464
+ if (classes.toAdd) {
7465
+ this.renderer.addClass(elem, classes.toAdd);
7466
+ }
7467
+ };
7181
7468
  var TextAreaComponent_1;
7182
7469
  __decorate([
7183
7470
  Input(),
@@ -7185,8 +7472,9 @@ var TextAreaComponent = /** @class */ (function (_super) {
7185
7472
  ], TextAreaComponent.prototype, "focusableId", void 0);
7186
7473
  __decorate([
7187
7474
  HostBinding('class.k-textarea'),
7475
+ HostBinding('class.k-input'),
7188
7476
  __metadata("design:type", Boolean)
7189
- ], TextAreaComponent.prototype, "hostClass", void 0);
7477
+ ], TextAreaComponent.prototype, "hostClasses", void 0);
7190
7478
  __decorate([
7191
7479
  HostBinding('class.k-flex-col'),
7192
7480
  __metadata("design:type", Boolean),
@@ -7226,6 +7514,21 @@ var TextAreaComponent = /** @class */ (function (_super) {
7226
7514
  Input(),
7227
7515
  __metadata("design:type", String)
7228
7516
  ], TextAreaComponent.prototype, "resizable", void 0);
7517
+ __decorate([
7518
+ Input(),
7519
+ __metadata("design:type", String),
7520
+ __metadata("design:paramtypes", [String])
7521
+ ], TextAreaComponent.prototype, "size", null);
7522
+ __decorate([
7523
+ Input(),
7524
+ __metadata("design:type", String),
7525
+ __metadata("design:paramtypes", [String])
7526
+ ], TextAreaComponent.prototype, "rounded", null);
7527
+ __decorate([
7528
+ Input(),
7529
+ __metadata("design:type", String),
7530
+ __metadata("design:paramtypes", [String])
7531
+ ], TextAreaComponent.prototype, "fillMode", null);
7229
7532
  __decorate([
7230
7533
  Output('focus'),
7231
7534
  __metadata("design:type", EventEmitter)
@@ -7252,7 +7555,7 @@ var TextAreaComponent = /** @class */ (function (_super) {
7252
7555
  { provide: KendoInput, useExisting: forwardRef(function () { return TextAreaComponent_1; }) }
7253
7556
  ],
7254
7557
  selector: 'kendo-textarea',
7255
- template: "\n <textarea\n #input\n [attr.aria-multiline]=\"true\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n class=\"k-input\"\n [ngClass]=\"resizableClass\"\n [id]=\"focusableId\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.rows]=\"rows\"\n [attr.cols]=\"cols\"\n [attr.tabindex]=\"tabIndex\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\">\n </textarea>\n <ng-content select=\"kendo-textarea-suffix\"></ng-content>\n "
7558
+ template: "\n <textarea\n #input\n [attr.aria-multiline]=\"true\"\n [attr.aria-disabled]=\"disabled ? true : undefined\"\n [attr.aria-readonly]=\"readonly ? true : undefined\"\n class=\"k-input-inner\"\n [ngClass]=\"resizableClass\"\n [id]=\"focusableId\"\n [value]=\"value\"\n [attr.placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.rows]=\"rows\"\n [attr.cols]=\"cols\"\n [attr.tabindex]=\"tabIndex\"\n [attr.title]=\"title\"\n [attr.maxlength]=\"maxlength\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleInputFocus,\n blur: handleInputBlur,\n input: handleInput}\">\n </textarea>\n <ng-content select=\"kendo-textarea-suffix\"></ng-content>\n "
7256
7559
  }),
7257
7560
  __metadata("design:paramtypes", [LocalizationService,
7258
7561
  NgZone,
@@ -8044,7 +8347,7 @@ var ColorInputComponent = /** @class */ (function () {
8044
8347
  ColorInputComponent = __decorate([
8045
8348
  Component({
8046
8349
  selector: 'kendo-colorinput',
8047
- template: "\n <div class=\"k-vstack\">\n <button #toggleFormatButton\n class=\"k-colorgradient-toggle-mode k-button k-icon-button k-flat\"\n [attr.aria-label]=\"formatButtonTitle\"\n [attr.title]=\"formatButtonTitle\"\n >\n <span class=\"k-button-icon k-icon k-i-arrows-kpi\"></span>\n </button>\n </div>\n <div *ngIf=\"formatView === 'hex'\" class=\"k-vstack\">\n <input\n #hexInput\n [id]=\"focusableId\"\n class=\"k-textbox k-hex-value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [value]=\"hex || ''\"\n (blur)=\"handleHexInputBlur()\"\n (input)=\"handleHexValueChange(hexInput.value)\"\n />\n <label [for]=\"focusableId\" class=\"k-colorgradient-input-label\">HEX</label>\n </div>\n <ng-container *ngIf=\"formatView === 'rgba'\">\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #red\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.r\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"red.focusableId\" class=\"k-colorgradient-input-label\">R</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #green\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.g\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"green.focusableId\" class=\"k-colorgradient-input-label\">G</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #blue\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.b\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"blue.focusableId\" class=\"k-colorgradient-input-label\">B</label>\n </div>\n <div class=\"k-vstack\" *ngIf=\"opacity\">\n <kendo-numerictextbox #opacityInput\n #alpha\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"1\"\n [(value)]=\"rgba.a\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [step]=\"0.01\"\n [format]=\"'n2'\"\n [decimals]=\"2\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"alpha.focusableId\" class=\"k-colorgradient-input-label\">A</label>\n </div>\n </ng-container>\n "
8350
+ template: "\n <div class=\"k-vstack\">\n <button #toggleFormatButton\n class=\"k-colorgradient-toggle-mode k-button k-button-md k-button-flat k-button-flat-base k-icon-button\"\n [attr.aria-label]=\"formatButtonTitle\"\n [attr.title]=\"formatButtonTitle\"\n >\n <span class=\"k-button-icon k-icon k-i-arrows-kpi\"></span>\n </button>\n </div>\n <div *ngIf=\"formatView === 'hex'\" class=\"k-vstack\">\n <input\n #hexInput\n [id]=\"focusableId\"\n class=\"k-input k-textbox k-input-solid k-input-md k-rounded-md k-hex-value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [value]=\"hex || ''\"\n (blur)=\"handleHexInputBlur()\"\n (input)=\"handleHexValueChange(hexInput.value)\"\n />\n <label [for]=\"focusableId\" class=\"k-colorgradient-input-label\">HEX</label>\n </div>\n <ng-container *ngIf=\"formatView === 'rgba'\">\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #red\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.r\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"red.focusableId\" class=\"k-colorgradient-input-label\">R</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #green\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.g\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"green.focusableId\" class=\"k-colorgradient-input-label\">G</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #blue\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.b\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"blue.focusableId\" class=\"k-colorgradient-input-label\">B</label>\n </div>\n <div class=\"k-vstack\" *ngIf=\"opacity\">\n <kendo-numerictextbox #opacityInput\n #alpha\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"1\"\n [(value)]=\"rgba.a\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [step]=\"0.01\"\n [format]=\"'n2'\"\n [decimals]=\"2\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"alpha.focusableId\" class=\"k-colorgradient-input-label\">A</label>\n </div>\n </ng-container>\n "
8048
8351
  }),
8049
8352
  __metadata("design:paramtypes", [ElementRef,
8050
8353
  Renderer2,
@@ -8132,6 +8435,7 @@ var ColorGradientComponent = /** @class */ (function () {
8132
8435
  this.updateValues = new Subject();
8133
8436
  this.notifyNgChanged = function () { };
8134
8437
  this.notifyNgTouched = function () { };
8438
+ validatePackage(packageMetadata);
8135
8439
  this.dynamicRTLSubscription = localizationService.changes.subscribe(function (_a) {
8136
8440
  var rtl = _a.rtl;
8137
8441
  _this.direction = rtl ? 'rtl' : 'ltr';
@@ -8699,7 +9003,7 @@ var ColorGradientComponent = /** @class */ (function () {
8699
9003
  useValue: 'kendo.colorgradient'
8700
9004
  }
8701
9005
  ],
8702
- template: "\n <ng-container kendoColorGradientLocalizedMessages\n i18n-colorGradientNoColor=\"kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorgradient.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorgradient.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-passContrast=\"kendo.colorgradient.passContrast|The pass message for the contrast tool.\"\n passContrast=\"Pass\"\n i18n-failContrast=\"kendo.colorgradient.failContrast|The fail message for the contrast tool.\"\n failContrast=\"Fail\"\n i18n-contrastRatio=\"kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-formatButton=\"kendo.colorgradient.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\">\n </ng-container>\n <div class=\"k-colorgradient-canvas k-hstack\">\n <div class=\"k-hsv-rectangle\" [style.background]=\"backgroundColor\">\n <div\n #gradientWrapper\n kendoDraggable\n class=\"k-hsv-gradient\"\n (click)=\"changePosition($event)\"\n (kendoPress)=\"handleDragPress($event)\"\n (kendoDrag)=\"onHandleDrag($event)\"\n (kendoRelease)=\"onHandleRelease()\">\n <div\n #gradientDragHandle\n class=\"k-hsv-draghandle k-draghandle\"\n tabindex=\"0\"\n [attr.title]=\"colorGradientHandleTitle\"\n [attr.aria-label]=\"colorGradientHandleAriaLabel\"\n >\n </div>\n </div>\n <svg kendoColorContrastSvg\n *ngIf=\"contrastToolVisible && gradientWrapper\"\n class=\"k-color-contrast-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [wrapper]=\"gradientWrapper ? gradientWrapper : undefined\"\n [hsva]=\"hsva\"\n [backgroundColor]=\"contrastTool\">\n </svg>\n </div>\n <div class=\"k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}\">\n <span class=\"k-clear-color k-button k-flat k-button-icon\"\n *ngIf=\"clearButton\"\n (click)=\"reset()\"\n (keydown.enter)=\"reset()\"\n (keydown.space)=\"reset()\"\n [attr.aria-label]=\"clearButtonTitle\"\n [attr.title]=\"clearButtonTitle\"\n tabindex=\"0\">\n <span class=\"k-icon k-i-reset-color\"></span>\n </span>\n <kendo-slider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-hue-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"hueSliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"360\"\n [smallStep]=\"5\"\n [largeStep]=\"10\"\n [value]=\"hsva.value.h\"\n (valueChange)=\"handleHueSliderChange($event)\"\n >\n </kendo-slider>\n <kendo-slider\n *ngIf=\"opacity\"\n #alphaSlider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-alpha-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"opacitySliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"100\"\n [smallStep]=\"1\"\n [largeStep]=\"10\"\n [value]=\"alphaSliderValue\"\n (valueChange)=\"handleAlphaSliderChange($event)\"\n >\n </kendo-slider>\n </div>\n </div>\n <kendo-colorinput #inputs\n [opacity]=\"opacity\"\n [formatView]=\"format\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleInputsValueChange($event)\"\n >\n </kendo-colorinput>\n <div class=\"k-colorgradient-color-contrast k-vbox\" *ngIf=\"contrastToolVisible\"\n kendoContrastTool\n [value]=\"value\"\n [ratio]=\"contrastTool\">\n </div>\n ",
9006
+ template: "\n <ng-container kendoColorGradientLocalizedMessages\n i18n-colorGradientNoColor=\"kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorgradient.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorgradient.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-passContrast=\"kendo.colorgradient.passContrast|The pass message for the contrast tool.\"\n passContrast=\"Pass\"\n i18n-failContrast=\"kendo.colorgradient.failContrast|The fail message for the contrast tool.\"\n failContrast=\"Fail\"\n i18n-contrastRatio=\"kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-formatButton=\"kendo.colorgradient.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\">\n </ng-container>\n <div class=\"k-colorgradient-canvas k-hstack\">\n <div class=\"k-hsv-rectangle\" [style.background]=\"backgroundColor\">\n <div\n #gradientWrapper\n kendoDraggable\n class=\"k-hsv-gradient\"\n (click)=\"changePosition($event)\"\n (kendoPress)=\"handleDragPress($event)\"\n (kendoDrag)=\"onHandleDrag($event)\"\n (kendoRelease)=\"onHandleRelease()\">\n <div\n #gradientDragHandle\n class=\"k-hsv-draghandle k-draghandle\"\n tabindex=\"0\"\n [attr.title]=\"colorGradientHandleTitle\"\n [attr.aria-label]=\"colorGradientHandleAriaLabel\"\n >\n </div>\n </div>\n <svg kendoColorContrastSvg\n *ngIf=\"contrastToolVisible && gradientWrapper\"\n class=\"k-color-contrast-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [wrapper]=\"gradientWrapper ? gradientWrapper : undefined\"\n [hsva]=\"hsva\"\n [backgroundColor]=\"contrastTool\">\n </svg>\n </div>\n <div class=\"k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}\">\n <span class=\"k-clear-color k-button k-button-md k-button-flat k-button-flat-base k-button-icon\"\n *ngIf=\"clearButton\"\n (click)=\"reset()\"\n (keydown.enter)=\"reset()\"\n (keydown.space)=\"reset()\"\n [attr.aria-label]=\"clearButtonTitle\"\n [attr.title]=\"clearButtonTitle\"\n tabindex=\"0\">\n <span class=\"k-icon k-i-reset-color\"></span>\n </span>\n <kendo-slider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-hue-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"hueSliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"360\"\n [smallStep]=\"5\"\n [largeStep]=\"10\"\n [value]=\"hsva.value.h\"\n (valueChange)=\"handleHueSliderChange($event)\"\n >\n </kendo-slider>\n <kendo-slider\n *ngIf=\"opacity\"\n #alphaSlider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-alpha-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"opacitySliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"100\"\n [smallStep]=\"1\"\n [largeStep]=\"10\"\n [value]=\"alphaSliderValue\"\n (valueChange)=\"handleAlphaSliderChange($event)\"\n >\n </kendo-slider>\n </div>\n </div>\n <kendo-colorinput #inputs\n [opacity]=\"opacity\"\n [formatView]=\"format\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleInputsValueChange($event)\"\n >\n </kendo-colorinput>\n <div class=\"k-colorgradient-color-contrast k-vbox\" *ngIf=\"contrastToolVisible\"\n kendoContrastTool\n [value]=\"value\"\n [ratio]=\"contrastTool\">\n </div>\n ",
8703
9007
  styles: ["\n .k-clear-color {\n position: absolute;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n }\n .k-colorgradient-slider.k-align-self-end {\n height: 140px;\n }\n\n .k-color-contrast-svg {\n position: absolute;\n overflow: visible;\n pointer-events: none;\n left: 0px;\n top: 0px;\n }\n "]
8704
9008
  }),
8705
9009
  __metadata("design:paramtypes", [ElementRef,
@@ -8711,6 +9015,32 @@ var ColorGradientComponent = /** @class */ (function () {
8711
9015
  return ColorGradientComponent;
8712
9016
  }());
8713
9017
 
9018
+ /**
9019
+ * @hidden
9020
+ */
9021
+ var ColorPaletteLocalizationService = /** @class */ (function (_super) {
9022
+ __extends(ColorPaletteLocalizationService, _super);
9023
+ function ColorPaletteLocalizationService(prefix, messageService, _rtl, flatColorPickerLocalization) {
9024
+ var _this = _super.call(this, prefix, messageService, _rtl) || this;
9025
+ _this.flatColorPickerLocalization = flatColorPickerLocalization;
9026
+ return _this;
9027
+ }
9028
+ ColorPaletteLocalizationService.prototype.get = function (shortKey) {
9029
+ if (this.flatColorPickerLocalization) {
9030
+ return this.flatColorPickerLocalization.get(shortKey);
9031
+ }
9032
+ return _super.prototype.get.call(this, shortKey);
9033
+ };
9034
+ ColorPaletteLocalizationService = __decorate([
9035
+ __param(0, Inject(L10N_PREFIX)),
9036
+ __param(1, Optional()),
9037
+ __param(2, Optional()), __param(2, Inject(RTL)),
9038
+ __param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
9039
+ __metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
9040
+ ], ColorPaletteLocalizationService);
9041
+ return ColorPaletteLocalizationService;
9042
+ }(LocalizationService));
9043
+
8714
9044
  /**
8715
9045
  * @hidden
8716
9046
  */
@@ -8771,32 +9101,6 @@ var ColorPaletteService = /** @class */ (function () {
8771
9101
  return ColorPaletteService;
8772
9102
  }());
8773
9103
 
8774
- /**
8775
- * @hidden
8776
- */
8777
- var ColorPaletteLocalizationService = /** @class */ (function (_super) {
8778
- __extends(ColorPaletteLocalizationService, _super);
8779
- function ColorPaletteLocalizationService(prefix, messageService, _rtl, flatColorPickerLocalization) {
8780
- var _this = _super.call(this, prefix, messageService, _rtl) || this;
8781
- _this.flatColorPickerLocalization = flatColorPickerLocalization;
8782
- return _this;
8783
- }
8784
- ColorPaletteLocalizationService.prototype.get = function (shortKey) {
8785
- if (this.flatColorPickerLocalization) {
8786
- return this.flatColorPickerLocalization.get(shortKey);
8787
- }
8788
- return _super.prototype.get.call(this, shortKey);
8789
- };
8790
- ColorPaletteLocalizationService = __decorate([
8791
- __param(0, Inject(L10N_PREFIX)),
8792
- __param(1, Optional()),
8793
- __param(2, Optional()), __param(2, Inject(RTL)),
8794
- __param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
8795
- __metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
8796
- ], ColorPaletteLocalizationService);
8797
- return ColorPaletteLocalizationService;
8798
- }(LocalizationService));
8799
-
8800
9104
  var DEFAULT_TILE_SIZE = 24;
8801
9105
  var DEFAULT_COLUMNS_COUNT = 10;
8802
9106
  var DEFAULT_PRESET$1 = 'office';
@@ -8870,6 +9174,7 @@ var ColorPaletteComponent = /** @class */ (function () {
8870
9174
  this._tabindex = 0;
8871
9175
  this.notifyNgTouched = function () { };
8872
9176
  this.notifyNgChanged = function () { };
9177
+ validatePackage(packageMetadata);
8873
9178
  this.dynamicRTLSubscription = localizationService.changes.subscribe(function (_a) {
8874
9179
  var rtl = _a.rtl;
8875
9180
  _this.direction = rtl ? 'rtl' : 'ltr';
@@ -9371,7 +9676,7 @@ var FlatColorPickerHeaderComponent = /** @class */ (function () {
9371
9676
  FlatColorPickerHeaderComponent = __decorate([
9372
9677
  Component({
9373
9678
  selector: '[kendoFlatColorPickerHeader]',
9374
- template: "\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <div *ngIf=\"viewButtons\" class=\"k-button-group k-button-group-flat\">\n <button *ngFor=\"let view of views\"\n #viewButtons\n (click)=\"onViewButtonClick(view)\"\n class=\"k-button k-icon-button k-flat\"\n [attr.title]=\"getText(view === 'gradient' ? 'gradientView' : 'paletteView')\"\n [attr.aria-label]=\"getText(view === 'gradient' ? 'gradientView' : 'paletteView')\"\n [attr.aria-pressed]=\"activeView === view\"\n [ngClass]=\"activeView === view ? 'k-state-selected' : ''\"\n >\n <span\n class=\"k-button-icon k-icon\"\n [ngClass]=\"getViewButtonIcon(view)\">\n </span>\n </button>\n </div>\n </div>\n <div class=\"k-spacer\"></div>\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <button *ngIf=\"clearButton\"\n #clearButton\n class=\"k-button k-icon-button k-flat k-coloreditor-reset\"\n [attr.aria-label]=\"getText('clearButton')\"\n [attr.title]=\"getText('clearButton')\"\n (click)=\"clearButtonClick.emit()\">\n <span class=\"k-button-icon k-icon k-i-reset-color\"></span>\n </button>\n <div class=\"k-coloreditor-preview k-vstack\" *ngIf=\"preview\">\n <span\n class=\"k-coloreditor-preview-color k-color-preview\"\n [attr.title]=\"getText('previewColor')\"\n [style.background-color]=\"selection\">\n </span>\n <span class=\"k-coloreditor-current-color k-color-preview\"\n [style.background-color]=\"value\"\n [attr.title]=\"getText('revertSelection')\"\n (click)=\"valuePaneClick.emit($event)\">\n </span>\n </div>\n </div>\n "
9679
+ template: "\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <div *ngIf=\"viewButtons\" class=\"k-button-group k-button-group-flat\">\n <button *ngFor=\"let view of views\"\n #viewButtons\n (click)=\"onViewButtonClick(view)\"\n class=\"k-button k-button-md k-button-flat k-button-flat-base k-icon-button\"\n [attr.title]=\"getText(view === 'gradient' ? 'gradientView' : 'paletteView')\"\n [attr.aria-label]=\"getText(view === 'gradient' ? 'gradientView' : 'paletteView')\"\n [attr.aria-pressed]=\"activeView === view\"\n [ngClass]=\"activeView === view ? 'k-state-selected' : ''\"\n >\n <span\n class=\"k-button-icon k-icon\"\n [ngClass]=\"getViewButtonIcon(view)\">\n </span>\n </button>\n </div>\n </div>\n <div class=\"k-spacer\"></div>\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <button *ngIf=\"clearButton\"\n #clearButton\n class=\"k-button k-button-md k-button-flat k-button-flat-base k-icon-button k-coloreditor-reset\"\n [attr.aria-label]=\"getText('clearButton')\"\n [attr.title]=\"getText('clearButton')\"\n (click)=\"clearButtonClick.emit()\">\n <span class=\"k-button-icon k-icon k-i-reset-color\"></span>\n </button>\n <div class=\"k-coloreditor-preview k-vstack\" *ngIf=\"preview\">\n <span\n class=\"k-coloreditor-preview-color k-color-preview\"\n [attr.title]=\"getText('previewColor')\"\n [style.background-color]=\"selection\">\n </span>\n <span class=\"k-coloreditor-current-color k-color-preview\"\n [style.background-color]=\"value\"\n [attr.title]=\"getText('revertSelection')\"\n (click)=\"valuePaneClick.emit($event)\">\n </span>\n </div>\n </div>\n "
9375
9680
  }),
9376
9681
  __metadata("design:paramtypes", [LocalizationService])
9377
9682
  ], FlatColorPickerHeaderComponent);
@@ -9414,7 +9719,7 @@ var FlatColorPickerActionButtonsComponent = /** @class */ (function () {
9414
9719
  FlatColorPickerActionButtonsComponent = __decorate([
9415
9720
  Component({
9416
9721
  selector: '[kendoFlatColorPickerActionButtons]',
9417
- template: "\n <button\n class=\"k-coloreditor-cancel k-button\"\n [attr.title]=\"getText('cancelButton')\"\n (click)=\"onActionButtonClick('cancel', $event)\"\n >{{getText('cancelButton')}}</button>\n <button #last\n class=\"k-coloreditor-apply k-button k-primary\"\n [attr.title]=\"getText('applyButton')\"\n (click)=\"onActionButtonClick('apply', $event)\"\n >{{getText('applyButton')}}</button>\n "
9722
+ template: "\n <button\n class=\"k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base\"\n [attr.title]=\"getText('cancelButton')\"\n (click)=\"onActionButtonClick('cancel', $event)\"\n >{{getText('cancelButton')}}</button>\n <button #last\n class=\"k-coloreditor-apply k-button k-button-md k-button-solid k-button-solid-primary\"\n [attr.title]=\"getText('applyButton')\"\n (click)=\"onActionButtonClick('apply', $event)\"\n >{{getText('applyButton')}}</button>\n "
9418
9723
  }),
9419
9724
  __metadata("design:paramtypes", [LocalizationService])
9420
9725
  ], FlatColorPickerActionButtonsComponent);
@@ -9428,10 +9733,10 @@ var FlatColorPickerActionButtonsComponent = /** @class */ (function () {
9428
9733
  * through a gradient that renders an hsv canvas. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
9429
9734
  */
9430
9735
  var FlatColorPickerComponent = /** @class */ (function () {
9431
- function FlatColorPickerComponent(service, host, localizationService, cdr, renderer, ngZone) {
9736
+ function FlatColorPickerComponent(host, service, localizationService, cdr, renderer, ngZone) {
9432
9737
  var _this = this;
9433
- this.service = service;
9434
9738
  this.host = host;
9739
+ this.service = service;
9435
9740
  this.localizationService = localizationService;
9436
9741
  this.cdr = cdr;
9437
9742
  this.renderer = renderer;
@@ -9514,6 +9819,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
9514
9819
  this.subscriptions = new Subscription();
9515
9820
  this.notifyNgChanged = function () { };
9516
9821
  this.notifyNgTouched = function () { };
9822
+ validatePackage(packageMetadata);
9517
9823
  this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
9518
9824
  var rtl = _a.rtl;
9519
9825
  _this.direction = rtl ? 'rtl' : 'ltr';
@@ -9945,8 +10251,8 @@ var FlatColorPickerComponent = /** @class */ (function () {
9945
10251
  ],
9946
10252
  template: "\n <ng-container kendoFlatColorPickerLocalizedMessages\n i18n-flatColorPickerNoColor=\"kendo.flatcolorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.flatcolorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.flatcolorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.flatcolorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.flatcolorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.flatcolorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.flatcolorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.flatcolorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.flatcolorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.flatcolorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.flatcolorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.flatcolorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.flatcolorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.flatcolorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.flatcolorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <div kendoFlatColorPickerHeader\n *ngIf=\"headerHasContent\"\n #header\n [clearButton]=\"clearButton\"\n [activeView]=\"activeView\"\n [views]=\"views\"\n [value]=\"value\"\n [selection]=\"selection\"\n [preview]=\"preview\"\n (clearButtonClick)=\"onClearButtonClick()\"\n (viewChange)=\"onViewChange($event)\"\n (valuePaneClick)=\"resetSelection($event)\">\n </div>\n <div class=\"k-coloreditor-views k-vstack\">\n <kendo-colorgradient #gradient\n *ngIf=\"activeView === 'gradient'\"\n [tabindex]=\"null\"\n [value]=\"selection\"\n [format]=\"format\"\n [opacity]=\"gradientSettings.opacity\"\n [delay]=\"gradientSettings.delay\"\n [contrastTool]=\"gradientSettings.contrastTool\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleValueChange($event)\"\n >\n </kendo-colorgradient>\n <kendo-colorpalette #palette\n *ngIf=\"activeView === 'palette'\"\n kendoFocusOnDomReady\n [palette]=\"paletteSettings.palette\"\n [columns]=\"paletteSettings.columns\"\n [tileSize]=\"paletteSettings.tileSize\"\n [format]=\"format\"\n [value]=\"selection\"\n (valueChange)=\"handleValueChange($event)\"\n >\n </kendo-colorpalette>\n </div>\n <div kendoFlatColorPickerActionButtons *ngIf=\"preview\"\n #footer\n [ngClass]=\"'k-justify-content-' + actionsLayout\"\n (actionButtonClick)=\"onAction($event)\">\n </div>\n"
9947
10253
  }),
9948
- __metadata("design:paramtypes", [FlatColorPickerService,
9949
- ElementRef,
10254
+ __metadata("design:paramtypes", [ElementRef,
10255
+ FlatColorPickerService,
9950
10256
  LocalizationService,
9951
10257
  ChangeDetectorRef,
9952
10258
  Renderer2,
@@ -9955,7 +10261,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
9955
10261
  return FlatColorPickerComponent;
9956
10262
  }());
9957
10263
 
9958
- var serial$2 = 0;
10264
+ var DOM_FOCUS_EVENTS = ['focus', 'blur'];
9959
10265
  /**
9960
10266
  * Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
9961
10267
  *
@@ -9963,17 +10269,16 @@ var serial$2 = 0;
9963
10269
  * which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
9964
10270
  */
9965
10271
  var ColorPickerComponent = /** @class */ (function () {
9966
- function ColorPickerComponent(popupService, cdr, localizationService, ngZone) {
10272
+ function ColorPickerComponent(host, popupService, cdr, localizationService, ngZone, renderer) {
9967
10273
  var _this = this;
10274
+ this.host = host;
9968
10275
  this.popupService = popupService;
9969
10276
  this.cdr = cdr;
9970
10277
  this.localizationService = localizationService;
9971
10278
  this.ngZone = ngZone;
10279
+ this.renderer = renderer;
9972
10280
  this.hostClasses = true;
9973
- /**
9974
- * @hidden
9975
- */
9976
- this.focusableId = "k-colorpicker-" + serial$2++;
10281
+ this.role = 'listbox';
9977
10282
  /**
9978
10283
  * Specifies the views that will be rendered in the popup.
9979
10284
  * By default both the gradient and palette views will be rendered.
@@ -10065,23 +10370,80 @@ var ColorPickerComponent = /** @class */ (function () {
10065
10370
  */
10066
10371
  this.activeColorClick = new EventEmitter();
10067
10372
  /**
10068
- * Fires each time the view is about to change.
10069
- * Used to provide a two-way binding for the `activeView` property.
10373
+ * Fires each time the view is about to change.
10374
+ * Used to provide a two-way binding for the `activeView` property.
10375
+ */
10376
+ this.activeViewChange = new EventEmitter();
10377
+ /**
10378
+ * Indicates whether the ColorPicker wrapper is focused.
10379
+ */
10380
+ this.isFocused = false;
10381
+ this._tabindex = 0;
10382
+ this._popupSettings = { animate: true };
10383
+ this._paletteSettings = {};
10384
+ this._gradientSettings = { opacity: true, delay: 0 };
10385
+ this._size = 'medium';
10386
+ this._rounded = 'medium';
10387
+ this._fillMode = 'solid';
10388
+ this.subscriptions = new Subscription();
10389
+ this.notifyNgTouched = function () { };
10390
+ this.notifyNgChanged = function () { };
10391
+ this.domFocusListener = function (event) { return event.stopImmediatePropagation(); };
10392
+ validatePackage(packageMetadata);
10393
+ this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
10394
+ var rtl = _a.rtl;
10395
+ _this.direction = rtl ? 'rtl' : 'ltr';
10396
+ });
10397
+ }
10398
+ ColorPickerComponent_1 = ColorPickerComponent;
10399
+ Object.defineProperty(ColorPickerComponent.prototype, "focusedClass", {
10400
+ get: function () {
10401
+ return this.isFocused;
10402
+ },
10403
+ enumerable: true,
10404
+ configurable: true
10405
+ });
10406
+ Object.defineProperty(ColorPickerComponent.prototype, "disabledClass", {
10407
+ get: function () {
10408
+ return this.disabled;
10409
+ },
10410
+ enumerable: true,
10411
+ configurable: true
10412
+ });
10413
+ Object.defineProperty(ColorPickerComponent.prototype, "ariaReadonly", {
10414
+ get: function () {
10415
+ return this.readonly;
10416
+ },
10417
+ enumerable: true,
10418
+ configurable: true
10419
+ });
10420
+ Object.defineProperty(ColorPickerComponent.prototype, "ariaExpanded", {
10421
+ get: function () {
10422
+ return this.isOpen;
10423
+ },
10424
+ enumerable: true,
10425
+ configurable: true
10426
+ });
10427
+ Object.defineProperty(ColorPickerComponent.prototype, "hostTabindex", {
10428
+ get: function () {
10429
+ return this.tabindex;
10430
+ },
10431
+ enumerable: true,
10432
+ configurable: true
10433
+ });
10434
+ Object.defineProperty(ColorPickerComponent.prototype, "view", {
10435
+ get: function () {
10436
+ return (this.views && this.views.length > 0) ? this.views[0] : null;
10437
+ },
10438
+ /**
10439
+ * @hidden
10070
10440
  */
10071
- this.activeViewChange = new EventEmitter();
10072
- this._tabindex = 0;
10073
- this._popupSettings = { animate: true };
10074
- this._paletteSettings = {};
10075
- this._gradientSettings = { opacity: true, delay: 0 };
10076
- this.notifyNgTouched = function () { };
10077
- this.notifyNgChanged = function () { };
10078
- validatePackage(packageMetadata);
10079
- this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
10080
- var rtl = _a.rtl;
10081
- _this.direction = rtl ? 'rtl' : 'ltr';
10082
- });
10083
- }
10084
- ColorPickerComponent_1 = ColorPickerComponent;
10441
+ set: function (view) {
10442
+ this.views = [view];
10443
+ },
10444
+ enumerable: true,
10445
+ configurable: true
10446
+ });
10085
10447
  Object.defineProperty(ColorPickerComponent.prototype, "value", {
10086
10448
  get: function () {
10087
10449
  return this._value;
@@ -10151,6 +10513,70 @@ var ColorPickerComponent = /** @class */ (function () {
10151
10513
  enumerable: true,
10152
10514
  configurable: true
10153
10515
  });
10516
+ Object.defineProperty(ColorPickerComponent.prototype, "size", {
10517
+ get: function () {
10518
+ return this._size;
10519
+ },
10520
+ /**
10521
+ * The size property specifies the font size and line height of the ColorPicker
10522
+ * ([see example]({% slug appearance_colorpicker %}#toc-size)).
10523
+ *
10524
+ * The possible values are:
10525
+ * * `'small'`
10526
+ * * `'medium'` (default)
10527
+ * * `'large'`
10528
+ * * `null`
10529
+ */
10530
+ set: function (size) {
10531
+ this.handleClasses(size, 'size');
10532
+ this._size = size;
10533
+ },
10534
+ enumerable: true,
10535
+ configurable: true
10536
+ });
10537
+ Object.defineProperty(ColorPickerComponent.prototype, "rounded", {
10538
+ get: function () {
10539
+ return this._rounded;
10540
+ },
10541
+ /**
10542
+ * The rounded property specifies the border radius of the ColorPicker
10543
+ * ([see example]({% slug appearance_colorpicker %}#toc-rounded)).
10544
+ *
10545
+ * The possible values are:
10546
+ * * `'small'`
10547
+ * * `'medium'` (default)
10548
+ * * `'large'`
10549
+ * * `'full'`
10550
+ * * `null`
10551
+ */
10552
+ set: function (rounded) {
10553
+ this.handleClasses(rounded, 'rounded');
10554
+ this._rounded = rounded;
10555
+ },
10556
+ enumerable: true,
10557
+ configurable: true
10558
+ });
10559
+ Object.defineProperty(ColorPickerComponent.prototype, "fillMode", {
10560
+ get: function () {
10561
+ return this._fillMode;
10562
+ },
10563
+ /**
10564
+ * The fillMode property specifies the background and border styles of the ColorPicker
10565
+ * ([see example]({% slug appearance_colorpicker %}#toc-fillMode)).
10566
+ *
10567
+ * The possible values are:
10568
+ * * `'flat'`
10569
+ * * `'solid'` (default)
10570
+ * * `'outline'`
10571
+ * * `null`
10572
+ */
10573
+ set: function (fillMode) {
10574
+ this.handleClasses(fillMode, 'fillMode');
10575
+ this._fillMode = fillMode;
10576
+ },
10577
+ enumerable: true,
10578
+ configurable: true
10579
+ });
10154
10580
  Object.defineProperty(ColorPickerComponent.prototype, "isOpen", {
10155
10581
  /**
10156
10582
  * Indicates whether the ColorPicker popup is open.
@@ -10188,6 +10614,16 @@ var ColorPickerComponent = /** @class */ (function () {
10188
10614
  columns: this._paletteSettings.columns || presetColumns || 10
10189
10615
  };
10190
10616
  };
10617
+ ColorPickerComponent.prototype.ngAfterViewInit = function () {
10618
+ var _this = this;
10619
+ var stylingInputs = ['size', 'rounded', 'fillMode'];
10620
+ stylingInputs.forEach(function (input) {
10621
+ _this.handleClasses(_this[input], input);
10622
+ });
10623
+ this.setHostElementAriaLabel();
10624
+ this.handleHostId();
10625
+ this.initDomEvents();
10626
+ };
10191
10627
  ColorPickerComponent.prototype.ngOnChanges = function (changes) {
10192
10628
  if (changes.format && changes.format.currentValue === 'name') {
10193
10629
  this.activeView = 'palette';
@@ -10196,23 +10632,18 @@ var ColorPickerComponent = /** @class */ (function () {
10196
10632
  this.format = 'rgba';
10197
10633
  this.value = parseColor$1(this.value, this.format, this.gradientSettings.opacity);
10198
10634
  }
10635
+ if (isChanged('value', changes)) {
10636
+ this.setHostElementAriaLabel();
10637
+ }
10199
10638
  };
10200
10639
  ColorPickerComponent.prototype.ngOnDestroy = function () {
10201
10640
  this.closePopup();
10202
10641
  if (this.dynamicRTLSubscription) {
10203
10642
  this.dynamicRTLSubscription.unsubscribe();
10204
10643
  }
10644
+ this.subscriptions.unsubscribe();
10645
+ this.handleDomEvents('remove', DOM_FOCUS_EVENTS);
10205
10646
  };
10206
- Object.defineProperty(ColorPickerComponent.prototype, "colorPickerAriaLabel", {
10207
- /**
10208
- * @hidden
10209
- */
10210
- get: function () {
10211
- return this.value ? this.value : this.localizationService.get('colorPickerNoColor');
10212
- },
10213
- enumerable: true,
10214
- configurable: true
10215
- });
10216
10647
  /**
10217
10648
  * @hidden
10218
10649
  */
@@ -10223,55 +10654,74 @@ var ColorPickerComponent = /** @class */ (function () {
10223
10654
  * @hidden
10224
10655
  */
10225
10656
  ColorPickerComponent.prototype.togglePopup = function () {
10226
- this.toggleWithEvents(!this.isOpen);
10227
10657
  this.focus();
10658
+ this.toggleWithEvents(!this.isOpen);
10228
10659
  };
10229
10660
  /**
10230
10661
  * @hidden
10231
10662
  */
10232
- ColorPickerComponent.prototype.handleActiveColorClick = function () {
10663
+ ColorPickerComponent.prototype.handleWrapperClick = function (event) {
10664
+ var _this = this;
10665
+ if (this.disabled) {
10666
+ return;
10667
+ }
10233
10668
  this.focus();
10234
- var event = new ActiveColorClickEvent(this.value);
10235
- this.activeColorClick.emit(event);
10236
- if (!event.isOpenPrevented() || this.isOpen) {
10237
- this.togglePopup();
10669
+ if (closest(event.target, function (element) { return element === _this.activeColor.nativeElement; })) {
10670
+ var event_1 = new ActiveColorClickEvent(this.value);
10671
+ this.activeColorClick.emit(event_1);
10672
+ if (!event_1.isOpenPrevented() || this.isOpen) {
10673
+ this.toggleWithEvents(!this.isOpen);
10674
+ }
10675
+ return;
10238
10676
  }
10677
+ this.toggleWithEvents(!this.isOpen);
10239
10678
  };
10240
10679
  /**
10241
10680
  * Focuses the wrapper of the ColorPicker.
10242
10681
  */
10243
10682
  ColorPickerComponent.prototype.focus = function () {
10244
- if (this.disabled) {
10245
- return;
10246
- }
10247
- this.wrapper.nativeElement.focus();
10683
+ this.isFocused = true;
10684
+ this.host.nativeElement.focus();
10248
10685
  };
10249
10686
  /**
10250
10687
  * @hidden
10251
10688
  */
10252
10689
  ColorPickerComponent.prototype.handleWrapperFocus = function () {
10690
+ var _this = this;
10253
10691
  if (this.isFocused) {
10254
10692
  return;
10255
10693
  }
10256
- this.isFocused = true;
10257
- this.onFocus.emit();
10694
+ this.ngZone.run(function () {
10695
+ _this.focus();
10696
+ _this.onFocus.emit();
10697
+ });
10258
10698
  };
10259
10699
  /**
10260
10700
  * Blurs the ColorPicker.
10261
10701
  */
10262
10702
  ColorPickerComponent.prototype.blur = function () {
10263
- this.wrapper.nativeElement.blur();
10703
+ this.isFocused = false;
10704
+ this.host.nativeElement.blur();
10705
+ this.notifyNgTouched();
10264
10706
  };
10265
10707
  /**
10266
10708
  * @hidden
10267
10709
  */
10268
10710
  ColorPickerComponent.prototype.handleWrapperBlur = function () {
10711
+ var _this = this;
10269
10712
  if (this.isOpen) {
10270
10713
  return;
10271
10714
  }
10272
- this.isFocused = false;
10273
- this.onBlur.emit();
10274
- this.notifyNgTouched();
10715
+ this.ngZone.run(function () {
10716
+ _this.onBlur.emit();
10717
+ _this.isFocused = false;
10718
+ });
10719
+ };
10720
+ /**
10721
+ * @hidden
10722
+ */
10723
+ ColorPickerComponent.prototype.arrowButtonMouseDown = function (ev) {
10724
+ ev.preventDefault();
10275
10725
  };
10276
10726
  /**
10277
10727
  * Clears the value of the ColorPicker.
@@ -10281,6 +10731,7 @@ var ColorPickerComponent = /** @class */ (function () {
10281
10731
  return;
10282
10732
  }
10283
10733
  this._value = undefined;
10734
+ this.setHostElementAriaLabel();
10284
10735
  this.notifyNgChanged(undefined);
10285
10736
  };
10286
10737
  /**
@@ -10308,6 +10759,7 @@ var ColorPickerComponent = /** @class */ (function () {
10308
10759
  if (valueChange) {
10309
10760
  this.value = parsedColor;
10310
10761
  this.valueChange.emit(parsedColor);
10762
+ this.setHostElementAriaLabel();
10311
10763
  this.notifyNgChanged(parsedColor);
10312
10764
  }
10313
10765
  };
@@ -10352,9 +10804,12 @@ var ColorPickerComponent = /** @class */ (function () {
10352
10804
  * @hidden
10353
10805
  */
10354
10806
  ColorPickerComponent.prototype.handleWrapperKeyDown = function (event) {
10807
+ var _this = this;
10355
10808
  if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.Enter) {
10356
10809
  event.preventDefault();
10357
- this.toggleWithEvents(true);
10810
+ this.ngZone.run(function () {
10811
+ _this.toggleWithEvents(true);
10812
+ });
10358
10813
  }
10359
10814
  };
10360
10815
  /**
@@ -10363,14 +10818,14 @@ var ColorPickerComponent = /** @class */ (function () {
10363
10818
  ColorPickerComponent.prototype.handlePopupKeyDown = function (event) {
10364
10819
  if (event.keyCode === Keys.Escape) {
10365
10820
  this.toggleWithEvents(false);
10366
- this.wrapper.nativeElement.focus();
10821
+ this.host.nativeElement.focus();
10367
10822
  }
10368
10823
  if (event.keyCode === Keys.Tab) {
10369
10824
  var currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
10370
10825
  var nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
10371
10826
  if (event.target === currentElement) {
10372
10827
  event.preventDefault();
10373
- nextElement.nativeElement.focus();
10828
+ nextElement.focus();
10374
10829
  }
10375
10830
  }
10376
10831
  };
@@ -10381,10 +10836,25 @@ var ColorPickerComponent = /** @class */ (function () {
10381
10836
  ColorPickerComponent.prototype.isEmpty = function () {
10382
10837
  return false;
10383
10838
  };
10839
+ ColorPickerComponent.prototype.setHostElementAriaLabel = function () {
10840
+ var ariaLabelValue = "" + (this.value ? this.value : this.localizationService.get('colorPickerNoColor'));
10841
+ this.renderer.setAttribute(this.host.nativeElement, 'aria-label', ariaLabelValue);
10842
+ };
10843
+ ColorPickerComponent.prototype.handleClasses = function (value, input) {
10844
+ var elem = this.host.nativeElement;
10845
+ var classes = getStylingClasses('picker', input, this[input], value);
10846
+ if (classes.toRemove) {
10847
+ this.renderer.removeClass(elem, classes.toRemove);
10848
+ }
10849
+ if (classes.toAdd) {
10850
+ this.renderer.addClass(elem, classes.toAdd);
10851
+ }
10852
+ };
10384
10853
  ColorPickerComponent.prototype.popupBlurInvalid = function (ev) {
10385
- var focusInPopupElement = this.popupRef.popupElement.contains(ev.relatedTarget);
10386
- var wrapperClicked = ev.relatedTarget === this.wrapper.nativeElement;
10387
- return !this.isFocused || wrapperClicked || focusInPopupElement;
10854
+ var _this = this;
10855
+ var focusInFlatColorPickerElement = this.popupRef.popupElement.contains(ev.relatedTarget);
10856
+ var hostClicked = closest(ev.relatedTarget, function (element) { return element === _this.host.nativeElement; });
10857
+ return hostClicked || focusInFlatColorPickerElement;
10388
10858
  };
10389
10859
  ColorPickerComponent.prototype.toggleWithEvents = function (open) {
10390
10860
  var sameState = this.isOpen === open;
@@ -10409,12 +10879,12 @@ var ColorPickerComponent = /** @class */ (function () {
10409
10879
  };
10410
10880
  ColorPickerComponent.prototype.focusFirstElement = function () {
10411
10881
  var _this = this;
10412
- this.ngZone.runOutsideAngular(function () {
10413
- setTimeout(function () {
10882
+ this.ngZone.onStable.pipe(take(1)).subscribe(function () {
10883
+ if (_this.flatColorPicker) {
10414
10884
  var elementToFocus = _this.flatColorPicker.gradient ? _this.flatColorPicker.gradient.gradientDragHandle :
10415
10885
  _this.flatColorPicker.palette.host;
10416
10886
  elementToFocus.nativeElement.focus();
10417
- });
10887
+ }
10418
10888
  });
10419
10889
  };
10420
10890
  ColorPickerComponent.prototype.openPopup = function () {
@@ -10423,7 +10893,7 @@ var ColorPickerComponent = /** @class */ (function () {
10423
10893
  var anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
10424
10894
  var popupPosition = { horizontal: horizontalAlign, vertical: "top" };
10425
10895
  this.popupRef = this.popupService.open({
10426
- anchor: this.wrapper,
10896
+ anchor: this.activeColor,
10427
10897
  animate: this.popupSettings.animate,
10428
10898
  appendTo: this.popupSettings.appendTo,
10429
10899
  popupAlign: popupPosition,
@@ -10435,7 +10905,7 @@ var ColorPickerComponent = /** @class */ (function () {
10435
10905
  this.popupRef.popupAnchorViewportLeave.subscribe(function () {
10436
10906
  _this.toggleWithEvents(false);
10437
10907
  if (!_this.isOpen) {
10438
- _this.wrapper.nativeElement.focus({
10908
+ _this.host.nativeElement.focus({
10439
10909
  preventScroll: true
10440
10910
  });
10441
10911
  }
@@ -10471,23 +10941,103 @@ var ColorPickerComponent = /** @class */ (function () {
10471
10941
  enumerable: true,
10472
10942
  configurable: true
10473
10943
  });
10944
+ ColorPickerComponent.prototype.handleDomEvents = function (action, events) {
10945
+ var _this = this;
10946
+ var hostElement = this.host.nativeElement;
10947
+ events.forEach(function (ev) { return hostElement[action + "EventListener"](ev, _this.domFocusListener, true); });
10948
+ };
10949
+ ColorPickerComponent.prototype.initDomEvents = function () {
10950
+ var _this = this;
10951
+ if (!this.host) {
10952
+ return;
10953
+ }
10954
+ var hostElement = this.host.nativeElement;
10955
+ this.ngZone.runOutsideAngular(function () {
10956
+ _this.subscriptions.add(_this.renderer.listen(hostElement, 'focusin', function () {
10957
+ _this.handleWrapperFocus();
10958
+ }));
10959
+ _this.subscriptions.add(_this.renderer.listen(hostElement, 'focusout', function (event) {
10960
+ var closestPopup = _this.popupRef ?
10961
+ closest(event.relatedTarget, function (element) { return element === _this.flatColorPicker.host.nativeElement; }) :
10962
+ false;
10963
+ var closestWrapper = closest(event.relatedTarget, function (element) { return element === _this.host.nativeElement; });
10964
+ if (!closestPopup && !closestWrapper) {
10965
+ _this.handleWrapperBlur();
10966
+ }
10967
+ }));
10968
+ _this.handleDomEvents('add', DOM_FOCUS_EVENTS);
10969
+ _this.subscriptions.add(_this.renderer.listen(hostElement, 'keydown', function (event) {
10970
+ _this.handleWrapperKeyDown(event);
10971
+ }));
10972
+ _this.subscriptions.add(_this.renderer.listen(hostElement, 'click', function (event) {
10973
+ _this.ngZone.run(function () {
10974
+ _this.handleWrapperClick(event);
10975
+ });
10976
+ }));
10977
+ });
10978
+ };
10979
+ ColorPickerComponent.prototype.handleHostId = function () {
10980
+ var hostElement = this.host.nativeElement;
10981
+ var existingId = hostElement.getAttribute('id');
10982
+ if (existingId) {
10983
+ this.focusableId = existingId;
10984
+ }
10985
+ else {
10986
+ var id = "k-" + guid();
10987
+ hostElement.setAttribute('id', id);
10988
+ this.focusableId = id;
10989
+ }
10990
+ };
10474
10991
  var ColorPickerComponent_1;
10475
10992
  __decorate([
10476
10993
  HostBinding('class.k-colorpicker'),
10994
+ HostBinding('class.k-icon-picker'),
10995
+ HostBinding('class.k-picker'),
10477
10996
  __metadata("design:type", Boolean)
10478
10997
  ], ColorPickerComponent.prototype, "hostClasses", void 0);
10998
+ __decorate([
10999
+ HostBinding('class.k-focus'),
11000
+ __metadata("design:type", Boolean),
11001
+ __metadata("design:paramtypes", [])
11002
+ ], ColorPickerComponent.prototype, "focusedClass", null);
11003
+ __decorate([
11004
+ HostBinding('attr.aria-disabled'),
11005
+ HostBinding('class.k-disabled'),
11006
+ __metadata("design:type", Boolean),
11007
+ __metadata("design:paramtypes", [])
11008
+ ], ColorPickerComponent.prototype, "disabledClass", null);
11009
+ __decorate([
11010
+ HostBinding('attr.aria-readonly'),
11011
+ __metadata("design:type", Boolean),
11012
+ __metadata("design:paramtypes", [])
11013
+ ], ColorPickerComponent.prototype, "ariaReadonly", null);
11014
+ __decorate([
11015
+ HostBinding('attr.aria-expanded'),
11016
+ __metadata("design:type", Boolean),
11017
+ __metadata("design:paramtypes", [])
11018
+ ], ColorPickerComponent.prototype, "ariaExpanded", null);
11019
+ __decorate([
11020
+ HostBinding('attr.tabindex'),
11021
+ __metadata("design:type", Number),
11022
+ __metadata("design:paramtypes", [])
11023
+ ], ColorPickerComponent.prototype, "hostTabindex", null);
10479
11024
  __decorate([
10480
11025
  HostBinding('attr.dir'),
10481
11026
  __metadata("design:type", String)
10482
11027
  ], ColorPickerComponent.prototype, "direction", void 0);
10483
11028
  __decorate([
10484
- Input(),
11029
+ HostBinding('attr.role'),
10485
11030
  __metadata("design:type", String)
10486
- ], ColorPickerComponent.prototype, "focusableId", void 0);
11031
+ ], ColorPickerComponent.prototype, "role", void 0);
10487
11032
  __decorate([
10488
11033
  Input(),
10489
11034
  __metadata("design:type", Array)
10490
11035
  ], ColorPickerComponent.prototype, "views", void 0);
11036
+ __decorate([
11037
+ Input(),
11038
+ __metadata("design:type", String),
11039
+ __metadata("design:paramtypes", [String])
11040
+ ], ColorPickerComponent.prototype, "view", null);
10491
11041
  __decorate([
10492
11042
  Input(),
10493
11043
  __metadata("design:type", String)
@@ -10549,6 +11099,21 @@ var ColorPickerComponent = /** @class */ (function () {
10549
11099
  Input(),
10550
11100
  __metadata("design:type", String)
10551
11101
  ], ColorPickerComponent.prototype, "actionsLayout", void 0);
11102
+ __decorate([
11103
+ Input(),
11104
+ __metadata("design:type", String),
11105
+ __metadata("design:paramtypes", [String])
11106
+ ], ColorPickerComponent.prototype, "size", null);
11107
+ __decorate([
11108
+ Input(),
11109
+ __metadata("design:type", String),
11110
+ __metadata("design:paramtypes", [String])
11111
+ ], ColorPickerComponent.prototype, "rounded", null);
11112
+ __decorate([
11113
+ Input(),
11114
+ __metadata("design:type", String),
11115
+ __metadata("design:paramtypes", [String])
11116
+ ], ColorPickerComponent.prototype, "fillMode", null);
10552
11117
  __decorate([
10553
11118
  Output(),
10554
11119
  __metadata("design:type", EventEmitter)
@@ -10586,9 +11151,9 @@ var ColorPickerComponent = /** @class */ (function () {
10586
11151
  __metadata("design:type", ViewContainerRef)
10587
11152
  ], ColorPickerComponent.prototype, "container", void 0);
10588
11153
  __decorate([
10589
- ViewChild('wrapper', { static: true }),
11154
+ ViewChild('activeColor', { static: true }),
10590
11155
  __metadata("design:type", ElementRef)
10591
- ], ColorPickerComponent.prototype, "wrapper", void 0);
11156
+ ], ColorPickerComponent.prototype, "activeColor", void 0);
10592
11157
  __decorate([
10593
11158
  ViewChild('popupTemplate', { static: true }),
10594
11159
  __metadata("design:type", TemplateRef)
@@ -10619,12 +11184,14 @@ var ColorPickerComponent = /** @class */ (function () {
10619
11184
  useValue: 'kendo.colorpicker'
10620
11185
  }
10621
11186
  ],
10622
- template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span\n #wrapper\n [ngClass]=\"{\n 'k-picker-wrap': true,\n 'k-state-disabled': this.disabled,\n 'k-state-focused': this.isFocused\n }\"\n role=\"listbox\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-readonly]=\"readonly\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"colorPickerAriaLabel\"\n [id]=\"focusableId\"\n [attr.tabindex]=\"tabindex\"\n (focus)=\"handleWrapperFocus()\"\n (blur)=\"handleWrapperBlur()\"\n (mousedown)=\"$event.preventDefault()\"\n (keydown)=\"handleWrapperKeyDown($event)\"\n >\n <span *ngIf=\"!iconStyles\" class=\"k-selected-color\" [style.background]=\"value\" (click)=\"handleActiveColorClick()\">\n <span class=\"k-icon k-i-line\" *ngIf=\"!value\"></span>\n </span>\n <span *ngIf=\"iconStyles\" class=\"k-tool-icon\" [ngClass]=\"iconStyles\" (click)=\"handleActiveColorClick()\">\n <span class=\"k-selected-color\" [style.background-color]=\"value\"></span>\n </span>\n <span class=\"k-select\" (click)=\"togglePopup()\">\n <span class=\"k-icon k-i-arrow-s\"></span>\n </span>\n </span>\n <ng-template #popupTemplate>\n <kendo-flatcolorpicker\n #flatColorPicker\n [value]=\"value\"\n [format]=\"format\"\n [views]=\"views\"\n [activeView]=\"activeView\"\n [actionsLayout]=\"actionsLayout\"\n [preview]=\"preview\"\n [gradientSettings]=\"gradientSettings\"\n [paletteSettings]=\"paletteSettings\"\n [clearButton]=\"clearButton\"\n (focusout)=\"handlePopupBlur($event)\"\n (cancel)=\"handleCancelEvent($event)\"\n (valueChange)=\"handleValueChange($event)\"\n (keydown)=\"handlePopupKeyDown($event)\"\n (activeViewChange)=\"activeViewChange.emit($event)\"\n (actionButtonClick)=\"togglePopup()\">\n </kendo-flatcolorpicker>\n </ng-template>\n <ng-container #container></ng-container>\n "
11187
+ template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span #activeColor class=\"k-input-inner\">\n <span\n class=\"k-value-icon k-color-preview\"\n [ngClass]=\"{'k-icon-color-preview': iconStyles, 'k-no-color': !value}\">\n <span *ngIf=\"iconClass || icon\" class=\"k-color-preview-icon k-icon\" [ngClass]=\"iconStyles\"></span>\n <span class=\"k-color-preview-mask\" [style.background-color]=\"value\"></span>\n </span>\n </span>\n <button\n #arrowButton\n tabindex=\"-1\"\n role=\"button\"\n class=\"k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button\">\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n <ng-template #popupTemplate>\n <kendo-flatcolorpicker\n #flatColorPicker\n [value]=\"value\"\n [format]=\"format\"\n [views]=\"views\"\n [activeView]=\"activeView\"\n [actionsLayout]=\"actionsLayout\"\n [preview]=\"preview\"\n [gradientSettings]=\"gradientSettings\"\n [paletteSettings]=\"paletteSettings\"\n [clearButton]=\"clearButton\"\n (cancel)=\"handleCancelEvent($event)\"\n (focusout)=\"handlePopupBlur($event)\"\n (valueChange)=\"handleValueChange($event)\"\n (keydown)=\"handlePopupKeyDown($event)\"\n (activeViewChange)=\"activeViewChange.emit($event)\"\n (actionButtonClick)=\"togglePopup()\">\n </kendo-flatcolorpicker>\n </ng-template>\n <ng-container #container></ng-container>\n "
10623
11188
  }),
10624
- __metadata("design:paramtypes", [PopupService,
11189
+ __metadata("design:paramtypes", [ElementRef,
11190
+ PopupService,
10625
11191
  ChangeDetectorRef,
10626
11192
  LocalizationService,
10627
- NgZone])
11193
+ NgZone,
11194
+ Renderer2])
10628
11195
  ], ColorPickerComponent);
10629
11196
  return ColorPickerComponent;
10630
11197
  }());
@@ -11069,17 +11636,92 @@ var ColorPickerModule = /** @class */ (function () {
11069
11636
  * ```
11070
11637
  */
11071
11638
  var CheckBoxDirective = /** @class */ (function () {
11072
- function CheckBoxDirective() {
11639
+ function CheckBoxDirective(renderer, hostElement) {
11640
+ this.renderer = renderer;
11641
+ this.hostElement = hostElement;
11073
11642
  this.kendoClass = true;
11643
+ this._size = 'medium';
11644
+ this._rounded = 'medium';
11074
11645
  }
11646
+ Object.defineProperty(CheckBoxDirective.prototype, "size", {
11647
+ get: function () {
11648
+ return this._size;
11649
+ },
11650
+ /**
11651
+ * The size property specifies the width and height of the CheckBox
11652
+ * ([see example]({% slug appearance_checkboxdirective %}#toc-size)).
11653
+ *
11654
+ * The possible values are:
11655
+ * * `'small'`
11656
+ * * `'medium'` (default)
11657
+ * * `'large'`
11658
+ * * `null`
11659
+ */
11660
+ set: function (size) {
11661
+ this.handleClasses(size, 'size');
11662
+ this._size = size;
11663
+ },
11664
+ enumerable: true,
11665
+ configurable: true
11666
+ });
11667
+ Object.defineProperty(CheckBoxDirective.prototype, "rounded", {
11668
+ get: function () {
11669
+ return this._rounded;
11670
+ },
11671
+ /**
11672
+ * The rounded property specifies the border radius of the CheckBox
11673
+ * ([see example]({% slug appearance_checkboxdirective %}#toc-rounded)).
11674
+ *
11675
+ * The possible values are:
11676
+ * * `'small'`
11677
+ * * `'medium'` (default)
11678
+ * * `'large'`
11679
+ * * `null`
11680
+ */
11681
+ set: function (rounded) {
11682
+ this.handleClasses(rounded, 'rounded');
11683
+ this._rounded = rounded;
11684
+ },
11685
+ enumerable: true,
11686
+ configurable: true
11687
+ });
11688
+ CheckBoxDirective.prototype.ngAfterViewInit = function () {
11689
+ var _this = this;
11690
+ var stylingInputs = ['size', 'rounded'];
11691
+ stylingInputs.forEach(function (input) {
11692
+ _this.handleClasses(_this[input], input);
11693
+ });
11694
+ };
11695
+ CheckBoxDirective.prototype.handleClasses = function (value, input) {
11696
+ var elem = this.hostElement.nativeElement;
11697
+ var classes = getStylingClasses('checkbox', input, this[input], value);
11698
+ if (classes.toRemove) {
11699
+ this.renderer.removeClass(elem, classes.toRemove);
11700
+ }
11701
+ if (classes.toAdd) {
11702
+ this.renderer.addClass(elem, classes.toAdd);
11703
+ }
11704
+ };
11075
11705
  __decorate([
11076
11706
  HostBinding('class.k-checkbox'),
11077
11707
  __metadata("design:type", Boolean)
11078
11708
  ], CheckBoxDirective.prototype, "kendoClass", void 0);
11709
+ __decorate([
11710
+ Input(),
11711
+ __metadata("design:type", String),
11712
+ __metadata("design:paramtypes", [String])
11713
+ ], CheckBoxDirective.prototype, "size", null);
11714
+ __decorate([
11715
+ Input(),
11716
+ __metadata("design:type", String),
11717
+ __metadata("design:paramtypes", [String])
11718
+ ], CheckBoxDirective.prototype, "rounded", null);
11079
11719
  CheckBoxDirective = __decorate([
11080
11720
  Directive({
11081
11721
  selector: 'input[kendoCheckBox]'
11082
- })
11722
+ }),
11723
+ __metadata("design:paramtypes", [Renderer2,
11724
+ ElementRef])
11083
11725
  ], CheckBoxDirective);
11084
11726
  return CheckBoxDirective;
11085
11727
  }());
@@ -11138,17 +11780,66 @@ var CheckBoxModule = /** @class */ (function () {
11138
11780
  * ```
11139
11781
  */
11140
11782
  var RadioButtonDirective = /** @class */ (function () {
11141
- function RadioButtonDirective() {
11783
+ function RadioButtonDirective(renderer, hostElement) {
11784
+ this.renderer = renderer;
11785
+ this.hostElement = hostElement;
11142
11786
  this.kendoClass = true;
11787
+ this._size = 'medium';
11788
+ validatePackage(packageMetadata);
11143
11789
  }
11790
+ Object.defineProperty(RadioButtonDirective.prototype, "size", {
11791
+ get: function () {
11792
+ return this._size;
11793
+ },
11794
+ /**
11795
+ * The size property specifies the width and height of the RadioButton
11796
+ * ([see example]({% slug appearance_radiobuttondirective %}#toc-size)).
11797
+ * The possible values are:
11798
+ * * `'small'`
11799
+ * * `'medium'` (default)
11800
+ * * `'large'`
11801
+ * * `null`
11802
+ */
11803
+ set: function (size) {
11804
+ this.handleClasses(size, 'size');
11805
+ this._size = size;
11806
+ },
11807
+ enumerable: true,
11808
+ configurable: true
11809
+ });
11810
+ RadioButtonDirective.prototype.ngAfterViewInit = function () {
11811
+ var _this = this;
11812
+ // kept in sync with other inputs for easier refactoring
11813
+ // to a common base class
11814
+ var stylingInputs = ['size'];
11815
+ stylingInputs.forEach(function (input) {
11816
+ _this.handleClasses(_this[input], input);
11817
+ });
11818
+ };
11819
+ RadioButtonDirective.prototype.handleClasses = function (value, input) {
11820
+ var elem = this.hostElement.nativeElement;
11821
+ var classes = getStylingClasses('radio', input, this[input], value);
11822
+ if (classes.toRemove) {
11823
+ this.renderer.removeClass(elem, classes.toRemove);
11824
+ }
11825
+ if (classes.toAdd) {
11826
+ this.renderer.addClass(elem, classes.toAdd);
11827
+ }
11828
+ };
11144
11829
  __decorate([
11145
11830
  HostBinding('class.k-radio'),
11146
11831
  __metadata("design:type", Boolean)
11147
11832
  ], RadioButtonDirective.prototype, "kendoClass", void 0);
11833
+ __decorate([
11834
+ Input(),
11835
+ __metadata("design:type", String),
11836
+ __metadata("design:paramtypes", [String])
11837
+ ], RadioButtonDirective.prototype, "size", null);
11148
11838
  RadioButtonDirective = __decorate([
11149
11839
  Directive({
11150
11840
  selector: 'input[kendoRadioButton]'
11151
- })
11841
+ }),
11842
+ __metadata("design:paramtypes", [Renderer2, ElementRef])
11152
11843
  ], RadioButtonDirective);
11153
11844
  return RadioButtonDirective;
11154
11845
  }());
@@ -11197,7 +11888,7 @@ var RadioButtonModule = /** @class */ (function () {
11197
11888
  return RadioButtonModule;
11198
11889
  }());
11199
11890
 
11200
- var serial$3 = 0;
11891
+ var serial$2 = 0;
11201
11892
  /**
11202
11893
  * Represents an error message that will be shown underneath
11203
11894
  * a Kendo control or native HTML form-bound component after a validation.
@@ -11216,7 +11907,7 @@ var ErrorComponent = /** @class */ (function () {
11216
11907
  /**
11217
11908
  * @hidden
11218
11909
  */
11219
- this.id = "kendo-error-" + serial$3++;
11910
+ this.id = "kendo-error-" + serial$2++;
11220
11911
  this.roleAttribute = 'alert';
11221
11912
  }
11222
11913
  Object.defineProperty(ErrorComponent.prototype, "startClass", {
@@ -11276,7 +11967,7 @@ var ErrorComponent = /** @class */ (function () {
11276
11967
  return ErrorComponent;
11277
11968
  }());
11278
11969
 
11279
- var serial$4 = 0;
11970
+ var serial$3 = 0;
11280
11971
  /**
11281
11972
  * Represents a hint message that will be shown underneath a form-bound component.
11282
11973
  */
@@ -11293,7 +11984,7 @@ var HintComponent = /** @class */ (function () {
11293
11984
  /**
11294
11985
  * @hidden
11295
11986
  */
11296
- this.id = "kendo-hint-" + serial$4++;
11987
+ this.id = "kendo-hint-" + serial$3++;
11297
11988
  this.hostClass = true;
11298
11989
  }
11299
11990
  Object.defineProperty(HintComponent.prototype, "startClass", {
@@ -11735,4 +12426,4 @@ var InputsModule = /** @class */ (function () {
11735
12426
  * Generated bundle index. Do not edit.
11736
12427
  */
11737
12428
 
11738
- export { CheckBoxModule, ColorContrastSvgComponent, ColorInputComponent, ContrastValidationComponent, ContrastComponent, FlatColorPickerActionButtonsComponent, FlatColorPickerHeaderComponent, FocusOnDomReadyDirective, ColorGradientLocalizationService, ColorPaletteLocalizationService, ColorPickerLocalizationService, ColorPickerCustomMessagesComponent, FlatColorPickerLocalizationService, ColorPickerMessages, ColorPaletteService, FlatColorPickerService, MaskingService, NumericTextBoxMessages, RadioButtonModule, RangeSliderCustomMessagesComponent, RangeSliderMessages, SHARED_DIRECTIVES, SliderCustomMessagesComponent, SliderMessages, SliderBase, SlidersCommonModule, SwitchCustomMessagesComponent, Messages, TextFieldsBase, TextBoxCustomMessagesComponent, TextBoxMessages, SliderComponent, RangeSliderComponent, LabelTemplateDirective, SwitchComponent, TextBoxContainerComponent, TextBoxDirective, TextAreaDirective, NumericTextBoxComponent, NumericTextBoxCustomMessagesComponent, MaskedTextBoxComponent, InputsModule, SliderTicksComponent, SliderModule, RangeSliderModule, SwitchModule, NumericTextBoxModule, MaskedTextBoxModule, TextBoxModule, TextAreaModule, ColorPickerComponent, ColorPaletteComponent, ColorGradientComponent, ColorPickerModule, FlatColorPickerComponent, ColorPickerCancelEvent, CheckBoxDirective, RadioButtonDirective, HintComponent, ErrorComponent, FormFieldComponent, FormFieldModule, TextBoxComponent, TextBoxPrefixTemplateDirective, TextBoxSuffixTemplateDirective, TextAreaComponent, TextAreaSuffixComponent, InputSeparatorComponent, SharedModule, LocalizedColorPickerMessagesDirective, LocalizedNumericTextBoxMessagesDirective, LocalizedTextBoxMessagesDirective, LocalizedSliderMessagesDirective, LocalizedRangeSliderMessagesDirective, LocalizedSwitchMessagesDirective, ColorPickerCloseEvent, ColorPickerOpenEvent, ActiveColorClickEvent };
12429
+ export { CheckBoxModule, ColorContrastSvgComponent, ColorInputComponent, ContrastValidationComponent, ContrastComponent, FlatColorPickerActionButtonsComponent, FlatColorPickerHeaderComponent, FocusOnDomReadyDirective, ColorGradientLocalizationService, ColorPaletteLocalizationService, ColorPickerLocalizationService, ColorPickerCustomMessagesComponent, FlatColorPickerLocalizationService, ColorPickerMessages, ColorPaletteService, FlatColorPickerService, MaskingService, NumericTextBoxMessages, RadioButtonModule, RangeSliderCustomMessagesComponent, RangeSliderMessages, SHARED_DIRECTIVES, SliderCustomMessagesComponent, SliderMessages, SliderBase, SlidersCommonModule, SwitchCustomMessagesComponent, Messages, TextFieldsBase, TextBoxCustomMessagesComponent, TextBoxMessages, SliderComponent, RangeSliderComponent, LabelTemplateDirective, SwitchComponent, TextBoxDirective, TextAreaDirective, NumericTextBoxComponent, NumericTextBoxCustomMessagesComponent, MaskedTextBoxComponent, InputsModule, SliderTicksComponent, SliderModule, RangeSliderModule, SwitchModule, NumericTextBoxModule, MaskedTextBoxModule, TextBoxModule, TextAreaModule, ColorPickerComponent, ColorPaletteComponent, ColorGradientComponent, ColorPickerModule, FlatColorPickerComponent, ColorPickerCancelEvent, CheckBoxDirective, RadioButtonDirective, HintComponent, ErrorComponent, FormFieldComponent, FormFieldModule, TextBoxComponent, TextBoxPrefixTemplateDirective, TextBoxSuffixTemplateDirective, TextAreaComponent, TextAreaSuffixComponent, InputSeparatorComponent, SharedModule, LocalizedColorPickerMessagesDirective, LocalizedNumericTextBoxMessagesDirective, LocalizedTextBoxMessagesDirective, LocalizedSliderMessagesDirective, LocalizedRangeSliderMessagesDirective, LocalizedSwitchMessagesDirective, ColorPickerCloseEvent, ColorPickerOpenEvent, ActiveColorClickEvent };