@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
@@ -10,13 +10,13 @@ import { Component, ElementRef, forwardRef, Input, Output, EventEmitter, HostBin
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
11
  import { packageMetadata } from '../package-metadata';
12
12
  import { invokeElementMethod } from '../common/dom-utils';
13
- import { areSame, requiresZoneOnBlur } from '../common/utils';
13
+ import { areSame, requiresZoneOnBlur, getStylingClasses } from '../common/utils';
14
14
  import { guid, hasObservers, KendoInput, Keys } from '@progress/kendo-angular-common';
15
15
  import { TextBoxSuffixTemplateDirective } from './textbox-suffix.directive';
16
16
  import { TextBoxPrefixTemplateDirective } from './textbox-prefix.directive';
17
17
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
18
18
  import { isSafari } from '../shared/utils';
19
- var FOCUSED = 'k-state-focused';
19
+ var FOCUSED = 'k-focus';
20
20
  var TextBoxComponent = /** @class */ (function () {
21
21
  function TextBoxComponent(localizationService, ngZone, changeDetector, renderer, injector, hostElement) {
22
22
  var _this = this;
@@ -151,9 +151,12 @@ var TextBoxComponent = /** @class */ (function () {
151
151
  * ```
152
152
  */
153
153
  this.onBlur = new EventEmitter();
154
- this.hostClass = true;
154
+ this.hostClasses = true;
155
155
  this._isFocused = false;
156
156
  this.focusChangedProgrammatically = false;
157
+ this._size = 'medium';
158
+ this._rounded = 'medium';
159
+ this._fillMode = 'solid';
157
160
  /**
158
161
  * @hidden
159
162
  */
@@ -208,6 +211,70 @@ var TextBoxComponent = /** @class */ (function () {
208
211
  this.direction = localizationService.rtl ? 'rtl' : 'ltr';
209
212
  }
210
213
  TextBoxComponent_1 = TextBoxComponent;
214
+ Object.defineProperty(TextBoxComponent.prototype, "size", {
215
+ get: function () {
216
+ return this._size;
217
+ },
218
+ /**
219
+ * The size property specifies the font size and line height of the TextBox
220
+ * ([see example]({% slug appearance_textbox %}#toc-size)).
221
+ *
222
+ * The possible values are:
223
+ * * `'small'`
224
+ * * `'medium'` (default)
225
+ * * `'large'`
226
+ * * `null`
227
+ */
228
+ set: function (size) {
229
+ this.handleClasses(size, 'size');
230
+ this._size = size;
231
+ },
232
+ enumerable: true,
233
+ configurable: true
234
+ });
235
+ Object.defineProperty(TextBoxComponent.prototype, "rounded", {
236
+ get: function () {
237
+ return this._rounded;
238
+ },
239
+ /**
240
+ * The rounded property specifies the border radius of the TextBox
241
+ * ([see example]({% slug appearance_textbox %}#toc-rounded)).
242
+ *
243
+ * The possible values are:
244
+ * * `'small'`
245
+ * * `'medium'` (default)
246
+ * * `'large'`
247
+ * * `'full'`
248
+ * * `null`
249
+ */
250
+ set: function (rounded) {
251
+ this.handleClasses(rounded, 'rounded');
252
+ this._rounded = rounded;
253
+ },
254
+ enumerable: true,
255
+ configurable: true
256
+ });
257
+ Object.defineProperty(TextBoxComponent.prototype, "fillMode", {
258
+ get: function () {
259
+ return this._fillMode;
260
+ },
261
+ /**
262
+ * The fillMode property specifies the background and border styles of the TextBox
263
+ * ([see example]({% slug appearance_textbox %}#toc-fillMode)).
264
+ *
265
+ * The possible values are:
266
+ * * `'flat'`
267
+ * * `'solid'` (default)
268
+ * * `'outline'`
269
+ * * `null`
270
+ */
271
+ set: function (fillMode) {
272
+ this.handleClasses(fillMode, 'fillMode');
273
+ this._fillMode = fillMode;
274
+ },
275
+ enumerable: true,
276
+ configurable: true
277
+ });
211
278
  Object.defineProperty(TextBoxComponent.prototype, "tabIndex", {
212
279
  get: function () {
213
280
  return this.tabindex;
@@ -284,6 +351,10 @@ var TextBoxComponent = /** @class */ (function () {
284
351
  }
285
352
  }));
286
353
  });
354
+ var stylingInputs = ['size', 'rounded', 'fillMode'];
355
+ stylingInputs.forEach(function (input) {
356
+ _this.handleClasses(_this[input], input);
357
+ });
287
358
  };
288
359
  TextBoxComponent.prototype.ngOnChanges = function (changes) {
289
360
  if (changes.disabled || changes.readonly || changes.value) {
@@ -417,8 +488,8 @@ var TextBoxComponent = /** @class */ (function () {
417
488
  */
418
489
  get: function () {
419
490
  return this.successIcon
420
- ? "k-text-success " + this.successIcon
421
- : "k-text-success k-icon k-i-check-outline";
491
+ ? "" + this.successIcon
492
+ : "k-validation-icon k-icon k-i-check";
422
493
  },
423
494
  enumerable: true,
424
495
  configurable: true
@@ -429,8 +500,8 @@ var TextBoxComponent = /** @class */ (function () {
429
500
  */
430
501
  get: function () {
431
502
  return this.errorIcon
432
- ? "k-text-error " + this.errorIcon
433
- : "k-text-error k-icon k-i-warning";
503
+ ? "" + this.errorIcon
504
+ : "k-validation-icon k-icon k-i-warning";
434
505
  },
435
506
  enumerable: true,
436
507
  configurable: true
@@ -442,7 +513,7 @@ var TextBoxComponent = /** @class */ (function () {
442
513
  get: function () {
443
514
  return this.clearButtonIcon
444
515
  ? this.clearButtonIcon
445
- : "k-icon k-i-close-circle";
516
+ : "k-icon k-i-x";
446
517
  },
447
518
  enumerable: true,
448
519
  configurable: true
@@ -521,6 +592,16 @@ var TextBoxComponent = /** @class */ (function () {
521
592
  _this.isFocused = false;
522
593
  });
523
594
  };
595
+ TextBoxComponent.prototype.handleClasses = function (value, input) {
596
+ var elem = this.hostElement.nativeElement;
597
+ var classes = getStylingClasses('input', input, this[input], value);
598
+ if (classes.toRemove) {
599
+ this.renderer.removeClass(elem, classes.toRemove);
600
+ }
601
+ if (classes.toAdd) {
602
+ this.renderer.addClass(elem, classes.toAdd);
603
+ }
604
+ };
524
605
  var TextBoxComponent_1;
525
606
  tslib_1.__decorate([
526
607
  Input(),
@@ -574,6 +655,21 @@ var TextBoxComponent = /** @class */ (function () {
574
655
  Input(),
575
656
  tslib_1.__metadata("design:type", String)
576
657
  ], TextBoxComponent.prototype, "clearButtonIcon", void 0);
658
+ tslib_1.__decorate([
659
+ Input(),
660
+ tslib_1.__metadata("design:type", String),
661
+ tslib_1.__metadata("design:paramtypes", [String])
662
+ ], TextBoxComponent.prototype, "size", null);
663
+ tslib_1.__decorate([
664
+ Input(),
665
+ tslib_1.__metadata("design:type", String),
666
+ tslib_1.__metadata("design:paramtypes", [String])
667
+ ], TextBoxComponent.prototype, "rounded", null);
668
+ tslib_1.__decorate([
669
+ Input(),
670
+ tslib_1.__metadata("design:type", String),
671
+ tslib_1.__metadata("design:paramtypes", [String])
672
+ ], TextBoxComponent.prototype, "fillMode", null);
577
673
  tslib_1.__decorate([
578
674
  Input(),
579
675
  tslib_1.__metadata("design:type", Number),
@@ -620,14 +716,15 @@ var TextBoxComponent = /** @class */ (function () {
620
716
  tslib_1.__metadata("design:type", TextBoxPrefixTemplateDirective)
621
717
  ], TextBoxComponent.prototype, "prefixTemplate", void 0);
622
718
  tslib_1.__decorate([
623
- HostBinding('class.k-state-disabled'),
719
+ HostBinding('class.k-disabled'),
624
720
  tslib_1.__metadata("design:type", Boolean),
625
721
  tslib_1.__metadata("design:paramtypes", [])
626
722
  ], TextBoxComponent.prototype, "disabledClass", null);
627
723
  tslib_1.__decorate([
628
724
  HostBinding('class.k-textbox'),
725
+ HostBinding('class.k-input'),
629
726
  tslib_1.__metadata("design:type", Boolean)
630
- ], TextBoxComponent.prototype, "hostClass", void 0);
727
+ ], TextBoxComponent.prototype, "hostClasses", void 0);
631
728
  tslib_1.__decorate([
632
729
  HostBinding('attr.dir'),
633
730
  tslib_1.__metadata("design:type", String)
@@ -646,7 +743,7 @@ var TextBoxComponent = /** @class */ (function () {
646
743
  { provide: KendoInput, useExisting: forwardRef(function () { return TextBoxComponent_1; }) }
647
744
  ],
648
745
  selector: 'kendo-textbox',
649
- 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 "
746
+ 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 "
650
747
  }),
651
748
  tslib_1.__metadata("design:paramtypes", [LocalizationService,
652
749
  NgZone,
@@ -21,7 +21,7 @@ var TextBoxDirective = /** @class */ (function () {
21
21
  this.renderer = renderer;
22
22
  this.inputElement = inputElement;
23
23
  this.ngZone = ngZone;
24
- this.hostClass = true;
24
+ this.hostClasses = true;
25
25
  /**
26
26
  * @hidden
27
27
  */
@@ -99,8 +99,9 @@ var TextBoxDirective = /** @class */ (function () {
99
99
  var TextBoxDirective_1;
100
100
  tslib_1.__decorate([
101
101
  HostBinding('class.k-textbox'),
102
+ HostBinding('class.k-input'),
102
103
  tslib_1.__metadata("design:type", Boolean)
103
- ], TextBoxDirective.prototype, "hostClass", void 0);
104
+ ], TextBoxDirective.prototype, "hostClasses", void 0);
104
105
  tslib_1.__decorate([
105
106
  Input(),
106
107
  tslib_1.__metadata("design:type", String),
@@ -5,7 +5,6 @@
5
5
  import * as tslib_1 from "tslib";
6
6
  import { NgModule } from "@angular/core";
7
7
  import { TextBoxDirective } from "./textbox/textbox.directive";
8
- import { TextBoxContainerComponent } from "./textbox/textbox-container.component";
9
8
  import { TextBoxComponent } from "./textbox/textbox.component";
10
9
  import { CommonModule } from "@angular/common";
11
10
  import { EventsModule } from "@progress/kendo-angular-common";
@@ -52,7 +51,6 @@ var TextBoxModule = /** @class */ (function () {
52
51
  NgModule({
53
52
  declarations: [
54
53
  TextBoxDirective,
55
- TextBoxContainerComponent,
56
54
  TextBoxComponent,
57
55
  TextBoxSuffixTemplateDirective,
58
56
  TextBoxPrefixTemplateDirective,
@@ -61,7 +59,6 @@ var TextBoxModule = /** @class */ (function () {
61
59
  ],
62
60
  exports: [
63
61
  TextBoxDirective,
64
- TextBoxContainerComponent,
65
62
  TextBoxComponent,
66
63
  TextBoxSuffixTemplateDirective,
67
64
  TextBoxPrefixTemplateDirective,
@@ -2,6 +2,8 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ import { ElementRef, Renderer2 } from '@angular/core';
6
+ import { CheckBoxRounded, InputSize } from '../common/models';
5
7
  /**
6
8
  * Represents the directive that renders the [Kendo UI CheckBox]({% slug overview_checkbox %}) input component.
7
9
  * The directive is placed on input type="checkbox" elements.
@@ -12,5 +14,34 @@
12
14
  * ```
13
15
  */
14
16
  export declare class CheckBoxDirective {
17
+ private renderer;
18
+ private hostElement;
15
19
  kendoClass: boolean;
20
+ /**
21
+ * The size property specifies the width and height of the CheckBox
22
+ * ([see example]({% slug appearance_checkboxdirective %}#toc-size)).
23
+ *
24
+ * The possible values are:
25
+ * * `'small'`
26
+ * * `'medium'` (default)
27
+ * * `'large'`
28
+ * * `null`
29
+ */
30
+ size: InputSize;
31
+ /**
32
+ * The rounded property specifies the border radius of the CheckBox
33
+ * ([see example]({% slug appearance_checkboxdirective %}#toc-rounded)).
34
+ *
35
+ * The possible values are:
36
+ * * `'small'`
37
+ * * `'medium'` (default)
38
+ * * `'large'`
39
+ * * `null`
40
+ */
41
+ rounded: CheckBoxRounded;
42
+ private _size;
43
+ private _rounded;
44
+ constructor(renderer: Renderer2, hostElement: ElementRef);
45
+ ngAfterViewInit(): void;
46
+ private handleClasses;
16
47
  }
@@ -3,7 +3,8 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
- import { Directive, HostBinding } from '@angular/core';
6
+ import { Directive, ElementRef, HostBinding, Input, Renderer2 } from '@angular/core';
7
+ import { getStylingClasses } from '../common/utils';
7
8
  /**
8
9
  * Represents the directive that renders the [Kendo UI CheckBox]({% slug overview_checkbox %}) input component.
9
10
  * The directive is placed on input type="checkbox" elements.
@@ -14,26 +15,83 @@ import { Directive, HostBinding } from '@angular/core';
14
15
  * ```
15
16
  */
16
17
  let CheckBoxDirective = class CheckBoxDirective {
18
+ constructor(renderer, hostElement) {
19
+ this.renderer = renderer;
20
+ this.hostElement = hostElement;
21
+ this.kendoClass = true;
22
+ this._size = 'medium';
23
+ this._rounded = 'medium';
24
+ }
17
25
  /**
18
- * Represents the directive that renders the [Kendo UI CheckBox]({% slug overview_checkbox %}) input component.
19
- * The directive is placed on input type="checkbox" elements.
26
+ * The size property specifies the width and height of the CheckBox
27
+ * ([see example]({% slug appearance_checkboxdirective %}#toc-size)).
20
28
  *
21
- * @example
22
- * ```ts-no-run
23
- * <input type="checkbox" kendoCheckBox />
24
- * ```
29
+ * The possible values are:
30
+ * * `'small'`
31
+ * * `'medium'` (default)
32
+ * * `'large'`
33
+ * * `null`
25
34
  */
26
- constructor() {
27
- this.kendoClass = true;
35
+ set size(size) {
36
+ this.handleClasses(size, 'size');
37
+ this._size = size;
38
+ }
39
+ get size() {
40
+ return this._size;
41
+ }
42
+ /**
43
+ * The rounded property specifies the border radius of the CheckBox
44
+ * ([see example]({% slug appearance_checkboxdirective %}#toc-rounded)).
45
+ *
46
+ * The possible values are:
47
+ * * `'small'`
48
+ * * `'medium'` (default)
49
+ * * `'large'`
50
+ * * `null`
51
+ */
52
+ set rounded(rounded) {
53
+ this.handleClasses(rounded, 'rounded');
54
+ this._rounded = rounded;
55
+ }
56
+ get rounded() {
57
+ return this._rounded;
58
+ }
59
+ ngAfterViewInit() {
60
+ const stylingInputs = ['size', 'rounded'];
61
+ stylingInputs.forEach(input => {
62
+ this.handleClasses(this[input], input);
63
+ });
64
+ }
65
+ handleClasses(value, input) {
66
+ const elem = this.hostElement.nativeElement;
67
+ const classes = getStylingClasses('checkbox', input, this[input], value);
68
+ if (classes.toRemove) {
69
+ this.renderer.removeClass(elem, classes.toRemove);
70
+ }
71
+ if (classes.toAdd) {
72
+ this.renderer.addClass(elem, classes.toAdd);
73
+ }
28
74
  }
29
75
  };
30
76
  tslib_1.__decorate([
31
77
  HostBinding('class.k-checkbox'),
32
78
  tslib_1.__metadata("design:type", Boolean)
33
79
  ], CheckBoxDirective.prototype, "kendoClass", void 0);
80
+ tslib_1.__decorate([
81
+ Input(),
82
+ tslib_1.__metadata("design:type", String),
83
+ tslib_1.__metadata("design:paramtypes", [String])
84
+ ], CheckBoxDirective.prototype, "size", null);
85
+ tslib_1.__decorate([
86
+ Input(),
87
+ tslib_1.__metadata("design:type", String),
88
+ tslib_1.__metadata("design:paramtypes", [String])
89
+ ], CheckBoxDirective.prototype, "rounded", null);
34
90
  CheckBoxDirective = tslib_1.__decorate([
35
91
  Directive({
36
92
  selector: 'input[kendoCheckBox]'
37
- })
93
+ }),
94
+ tslib_1.__metadata("design:paramtypes", [Renderer2,
95
+ ElementRef])
38
96
  ], CheckBoxDirective);
39
97
  export { CheckBoxDirective };
@@ -10,6 +10,7 @@ import { BehaviorSubject, Subject } from 'rxjs';
10
10
  import { throttleTime } from 'rxjs/operators';
11
11
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
12
12
  import { isChanged, isDocumentAvailable, KendoInput } from '@progress/kendo-angular-common';
13
+ import { validatePackage } from '@progress/kendo-licensing';
13
14
  import { containsFocus, isUntouched } from '../common/dom-utils';
14
15
  import { parseColor, getHSV, getColorFromHSV, getColorFromHue } from './utils';
15
16
  import { isPresent, fitIntoBounds } from '../common/utils';
@@ -17,6 +18,7 @@ import { SliderComponent } from '../slider/slider.component';
17
18
  import { ColorGradientLocalizationService } from './localization/colorgradient-localization.service';
18
19
  import { ColorInputComponent } from './color-input.component';
19
20
  import { DEFAULT_GRADIENT_BACKGROUND_COLOR, DEFAULT_OUTPUT_FORMAT, DRAGHANDLE_MOVE_SPEED } from './constants';
21
+ import { packageMetadata } from '../package-metadata';
20
22
  let serial = 0;
21
23
  /**
22
24
  * The ColorGradient component enables smooth color transitions and provides options for selecting specific colors over the drag handle.
@@ -95,6 +97,7 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
95
97
  this.updateValues = new Subject();
96
98
  this.notifyNgChanged = () => { };
97
99
  this.notifyNgTouched = () => { };
100
+ validatePackage(packageMetadata);
98
101
  this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
99
102
  this.direction = rtl ? 'rtl' : 'ltr';
100
103
  });
@@ -642,7 +645,7 @@ ColorGradientComponent = ColorGradientComponent_1 = tslib_1.__decorate([
642
645
  </svg>
643
646
  </div>
644
647
  <div class="k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}">
645
- <span class="k-clear-color k-button k-flat k-button-icon"
648
+ <span class="k-clear-color k-button k-button-md k-button-flat k-button-flat-base k-button-icon"
646
649
  *ngIf="clearButton"
647
650
  (click)="reset()"
648
651
  (keydown.enter)="reset()"
@@ -172,7 +172,7 @@ ColorInputComponent = tslib_1.__decorate([
172
172
  template: `
173
173
  <div class="k-vstack">
174
174
  <button #toggleFormatButton
175
- class="k-colorgradient-toggle-mode k-button k-icon-button k-flat"
175
+ class="k-colorgradient-toggle-mode k-button k-button-md k-button-flat k-button-flat-base k-icon-button"
176
176
  [attr.aria-label]="formatButtonTitle"
177
177
  [attr.title]="formatButtonTitle"
178
178
  >
@@ -183,7 +183,7 @@ ColorInputComponent = tslib_1.__decorate([
183
183
  <input
184
184
  #hexInput
185
185
  [id]="focusableId"
186
- class="k-textbox k-hex-value"
186
+ class="k-input k-textbox k-input-solid k-input-md k-rounded-md k-hex-value"
187
187
  [disabled]="disabled"
188
188
  [readonly]="readonly"
189
189
  [value]="hex || ''"
@@ -4,9 +4,9 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { OnInit, EventEmitter, SimpleChanges, OnChanges, OnDestroy, ChangeDetectorRef, Renderer2, ElementRef, AfterViewInit } from '@angular/core';
6
6
  import { ControlValueAccessor } from '@angular/forms';
7
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
8
  import { TileSize, OutputFormat, TableCell } from './models';
8
9
  import { ColorPaletteService } from './services/color-palette.service';
9
- import { LocalizationService } from '@progress/kendo-angular-l10n';
10
10
  /**
11
11
  * The ColorPalette component provides a set of predefined palette presets and enables you to implement a custom color palette.
12
12
  * The ColorPalette is independently used by `kendo-colorpicker` and can be directly added to the page.
@@ -6,13 +6,15 @@ import * as tslib_1 from "tslib";
6
6
  var ColorPaletteComponent_1;
7
7
  import { Component, Input, EventEmitter, Output, HostBinding, HostListener, forwardRef, ChangeDetectorRef, Renderer2, ElementRef } from '@angular/core';
8
8
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
+ import { Keys, KendoInput, guid } from '@progress/kendo-angular-common';
10
+ import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
11
+ import { validatePackage } from '@progress/kendo-licensing';
12
+ import { ColorPaletteLocalizationService } from './localization/colorpalette-localization.service';
13
+ import { packageMetadata } from '../package-metadata';
9
14
  import { PALETTEPRESETS } from './models';
10
15
  import { parseColor } from './utils';
11
16
  import { isPresent } from '../common/utils';
12
17
  import { ColorPaletteService } from './services/color-palette.service';
13
- import { Keys, KendoInput, guid } from '@progress/kendo-angular-common';
14
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
15
- import { ColorPaletteLocalizationService } from './localization/colorpalette-localization.service';
16
18
  const DEFAULT_TILE_SIZE = 24;
17
19
  const DEFAULT_COLUMNS_COUNT = 10;
18
20
  const DEFAULT_PRESET = 'office';
@@ -85,6 +87,7 @@ let ColorPaletteComponent = ColorPaletteComponent_1 = class ColorPaletteComponen
85
87
  this._tabindex = 0;
86
88
  this.notifyNgTouched = () => { };
87
89
  this.notifyNgChanged = () => { };
90
+ validatePackage(packageMetadata);
88
91
  this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
89
92
  this.direction = rtl ? 'rtl' : 'ltr';
90
93
  });
@@ -2,25 +2,34 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { EventEmitter, OnDestroy, ViewContainerRef, ChangeDetectorRef, NgZone, OnChanges, OnInit } from '@angular/core';
5
+ import { EventEmitter, ElementRef, OnDestroy, ViewContainerRef, ChangeDetectorRef, NgZone, OnChanges, OnInit, AfterViewInit, Renderer2 } from '@angular/core';
6
6
  import { ControlValueAccessor } from '@angular/forms';
7
7
  import { PopupService } from '@progress/kendo-angular-popup';
8
8
  import { LocalizationService } from '@progress/kendo-angular-l10n';
9
9
  import { PopupSettings, PaletteSettings, OutputFormat, ColorPickerView, GradientSettings, ColorPickerActionsLayout } from './models';
10
10
  import { ActiveColorClickEvent, ColorPickerCancelEvent, ColorPickerCloseEvent, ColorPickerOpenEvent } from './events';
11
+ import { InputFillMode, InputRounded, InputSize } from '../common/models';
11
12
  /**
12
13
  * Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
13
14
  *
14
15
  * The ColorPicker is a powerful tool for choosing colors from Gradient and Palette views
15
16
  * which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
16
17
  */
17
- export declare class ColorPickerComponent implements OnInit, OnChanges, OnDestroy, ControlValueAccessor {
18
+ export declare class ColorPickerComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy, ControlValueAccessor {
19
+ private host;
18
20
  private popupService;
19
21
  private cdr;
20
22
  private localizationService;
21
23
  private ngZone;
24
+ private renderer;
22
25
  hostClasses: boolean;
26
+ readonly focusedClass: boolean;
27
+ readonly disabledClass: boolean;
28
+ readonly ariaReadonly: boolean;
29
+ readonly ariaExpanded: boolean;
30
+ readonly hostTabindex: number;
23
31
  direction: string;
32
+ role: string;
24
33
  /**
25
34
  * @hidden
26
35
  */
@@ -30,6 +39,10 @@ export declare class ColorPickerComponent implements OnInit, OnChanges, OnDestro
30
39
  * By default both the gradient and palette views will be rendered.
31
40
  */
32
41
  views: Array<ColorPickerView>;
42
+ /**
43
+ * @hidden
44
+ */
45
+ view: ColorPickerView;
33
46
  /**
34
47
  * Sets the initially active view in the popup. The property supports two-way binding.
35
48
  *
@@ -126,6 +139,40 @@ export declare class ColorPickerComponent implements OnInit, OnChanges, OnDestro
126
139
  * * `stretch`
127
140
  */
128
141
  actionsLayout: ColorPickerActionsLayout;
142
+ /**
143
+ * The size property specifies the font size and line height of the ColorPicker
144
+ * ([see example]({% slug appearance_colorpicker %}#toc-size)).
145
+ *
146
+ * The possible values are:
147
+ * * `'small'`
148
+ * * `'medium'` (default)
149
+ * * `'large'`
150
+ * * `null`
151
+ */
152
+ size: InputSize;
153
+ /**
154
+ * The rounded property specifies the border radius of the ColorPicker
155
+ * ([see example]({% slug appearance_colorpicker %}#toc-rounded)).
156
+ *
157
+ * The possible values are:
158
+ * * `'small'`
159
+ * * `'medium'` (default)
160
+ * * `'large'`
161
+ * * `'full'`
162
+ * * `null`
163
+ */
164
+ rounded: InputRounded;
165
+ /**
166
+ * The fillMode property specifies the background and border styles of the ColorPicker
167
+ * ([see example]({% slug appearance_colorpicker %}#toc-fillMode)).
168
+ *
169
+ * The possible values are:
170
+ * * `'flat'`
171
+ * * `'solid'` (default)
172
+ * * `'outline'`
173
+ * * `null`
174
+ */
175
+ fillMode: InputFillMode;
129
176
  /**
130
177
  * Fires each time the value is changed.
131
178
  */
@@ -186,7 +233,7 @@ export declare class ColorPickerComponent implements OnInit, OnChanges, OnDestro
186
233
  * for example, inside the component markup.
187
234
  */
188
235
  container: ViewContainerRef;
189
- private wrapper;
236
+ private activeColor;
190
237
  private popupTemplate;
191
238
  private flatColorPicker;
192
239
  private popupRef;
@@ -195,15 +242,16 @@ export declare class ColorPickerComponent implements OnInit, OnChanges, OnDestro
195
242
  private _popupSettings;
196
243
  private _paletteSettings;
197
244
  private _gradientSettings;
245
+ private _size;
246
+ private _rounded;
247
+ private _fillMode;
198
248
  private dynamicRTLSubscription;
199
- constructor(popupService: PopupService, cdr: ChangeDetectorRef, localizationService: LocalizationService, ngZone: NgZone);
249
+ private subscriptions;
250
+ constructor(host: ElementRef, popupService: PopupService, cdr: ChangeDetectorRef, localizationService: LocalizationService, ngZone: NgZone, renderer: Renderer2);
200
251
  ngOnInit(): void;
252
+ ngAfterViewInit(): void;
201
253
  ngOnChanges(changes: any): void;
202
254
  ngOnDestroy(): void;
203
- /**
204
- * @hidden
205
- */
206
- readonly colorPickerAriaLabel: string;
207
255
  /**
208
256
  * @hidden
209
257
  */
@@ -215,7 +263,7 @@ export declare class ColorPickerComponent implements OnInit, OnChanges, OnDestro
215
263
  /**
216
264
  * @hidden
217
265
  */
218
- handleActiveColorClick(): void;
266
+ handleWrapperClick(event: MouseEvent): void;
219
267
  /**
220
268
  * Focuses the wrapper of the ColorPicker.
221
269
  */
@@ -232,6 +280,10 @@ export declare class ColorPickerComponent implements OnInit, OnChanges, OnDestro
232
280
  * @hidden
233
281
  */
234
282
  handleWrapperBlur(): void;
283
+ /**
284
+ * @hidden
285
+ */
286
+ arrowButtonMouseDown(ev: MouseEvent): void;
235
287
  /**
236
288
  * Clears the value of the ColorPicker.
237
289
  */
@@ -280,6 +332,8 @@ export declare class ColorPickerComponent implements OnInit, OnChanges, OnDestro
280
332
  * Used by the FloatingLabel to determine if the component is empty.
281
333
  */
282
334
  isEmpty(): boolean;
335
+ private setHostElementAriaLabel;
336
+ private handleClasses;
283
337
  private popupBlurInvalid;
284
338
  private toggleWithEvents;
285
339
  private focusFirstElement;
@@ -289,4 +343,8 @@ export declare class ColorPickerComponent implements OnInit, OnChanges, OnDestro
289
343
  private readonly lastFocusableElement;
290
344
  private notifyNgTouched;
291
345
  private notifyNgChanged;
346
+ private handleDomEvents;
347
+ private initDomEvents;
348
+ private domFocusListener;
349
+ private handleHostId;
292
350
  }