@progress/kendo-angular-inputs 9.0.0-next.202202161022 → 9.0.0-next.202203101134

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.
@@ -116,10 +116,13 @@ export declare class ColorGradientComponent implements OnChanges, OnDestroy, Con
116
116
  inputs: ColorInputComponent;
117
117
  private alphaSlider;
118
118
  private gradientWrapper;
119
+ private hsvRectangle;
119
120
  private _value;
120
121
  private _tabindex;
121
122
  private _contrastTool;
122
123
  private listeners;
124
+ private hueSliderTouched;
125
+ private alphaSliderTouched;
123
126
  private updateValues;
124
127
  private changeRequestsSubscription;
125
128
  private dynamicRTLSubscription;
@@ -216,11 +219,12 @@ export declare class ColorGradientComponent implements OnChanges, OnDestroy, Con
216
219
  private notifyNgChanged;
217
220
  private notifyNgTouched;
218
221
  private moveDragHandle;
219
- private updateUI;
220
222
  private handleValueChange;
221
223
  private setDragHandleElementPosition;
222
224
  private setAlphaSliderBackground;
223
225
  private setHostElementAriaLabel;
226
+ private setBackgroundColor;
227
+ private updateUI;
224
228
  private addEventListeners;
225
229
  private subscribeChanges;
226
230
  private unsubscribeChanges;
@@ -99,6 +99,8 @@ export class ColorGradientComponent {
99
99
  this.hsva = new BehaviorSubject({});
100
100
  this._tabindex = 0;
101
101
  this.listeners = [];
102
+ this.hueSliderTouched = false;
103
+ this.alphaSliderTouched = false;
102
104
  this.updateValues = new Subject();
103
105
  this.notifyNgChanged = () => { };
104
106
  this.notifyNgTouched = () => { };
@@ -310,7 +312,9 @@ export class ColorGradientComponent {
310
312
  this.hsva.next(hsva);
311
313
  this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
312
314
  this.backgroundColor = getColorFromHue(hue);
315
+ this.setBackgroundColor(this.backgroundColor);
313
316
  this.setAlphaSliderBackground(this.backgroundColor);
317
+ this.hueSliderTouched = true;
314
318
  }
315
319
  /**
316
320
  * @hidden
@@ -320,6 +324,7 @@ export class ColorGradientComponent {
320
324
  hsva.a = alpha / 100;
321
325
  this.hsva.next(hsva);
322
326
  this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
327
+ this.alphaSliderTouched = true;
323
328
  }
324
329
  /**
325
330
  * @hidden
@@ -411,19 +416,6 @@ export class ColorGradientComponent {
411
416
  this.updateValues.next(getColorFromHSV(this.hsva.value, this.format, this.opacity));
412
417
  this.setAlphaSliderBackground(getColorFromHSV(Object.assign(Object.assign({}, this.hsva.value), { a: 1 }), this.format, this.opacity));
413
418
  }
414
- updateUI() {
415
- if (!isDocumentAvailable()) {
416
- return;
417
- }
418
- this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
419
- const gradientRect = this.gradientRect;
420
- const top = (1 - this.hsva.value.v) * gradientRect.height;
421
- const left = this.hsva.value.s * gradientRect.width;
422
- this.setDragHandleElementPosition(top, left);
423
- this.backgroundColor = getColorFromHue(this.hsva.value.h);
424
- this.setAlphaSliderBackground(this.backgroundColor);
425
- this.setHostElementAriaLabel();
426
- }
427
419
  handleValueChange(color) {
428
420
  if (this.value === color) {
429
421
  return;
@@ -449,6 +441,28 @@ export class ColorGradientComponent {
449
441
  const parsed = parseColor(this.value, this.format, this.opacity);
450
442
  this.renderer.setAttribute(this.host.nativeElement, 'aria-label', `${this.value ? parsed : this.localizationService.get('colorGradientNoColor')}`);
451
443
  }
444
+ setBackgroundColor(color) {
445
+ this.renderer.setStyle(this.hsvRectangle.nativeElement, 'background', color);
446
+ }
447
+ updateUI() {
448
+ if (!isDocumentAvailable()) {
449
+ return;
450
+ }
451
+ if (this.hueSliderTouched || this.alphaSliderTouched) {
452
+ this.hueSliderTouched = false;
453
+ this.alphaSliderTouched = false;
454
+ return;
455
+ }
456
+ this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
457
+ const gradientRect = this.gradientRect;
458
+ const top = (1 - this.hsva.value.v) * gradientRect.height;
459
+ const left = this.hsva.value.s * gradientRect.width;
460
+ this.setDragHandleElementPosition(top, left);
461
+ this.backgroundColor = getColorFromHue(this.hsva.value.h);
462
+ this.setBackgroundColor(this.backgroundColor);
463
+ this.setAlphaSliderBackground(this.backgroundColor);
464
+ this.setHostElementAriaLabel();
465
+ }
452
466
  addEventListeners() {
453
467
  this.ngZone.runOutsideAngular(() => {
454
468
  const focusOutListener = this.renderer.listen(this.host.nativeElement, 'focusout', (event) => {
@@ -505,7 +519,7 @@ ColorGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
505
519
  provide: L10N_PREFIX,
506
520
  useValue: 'kendo.colorgradient'
507
521
  }
508
- ], viewQueries: [{ propertyName: "gradientDragHandle", first: true, predicate: ["gradientDragHandle"], descendants: true, read: ElementRef }, { propertyName: "inputs", first: true, predicate: ["inputs"], descendants: true }, { propertyName: "alphaSlider", first: true, predicate: ["alphaSlider"], descendants: true }, { propertyName: "gradientWrapper", first: true, predicate: ["gradientWrapper"], descendants: true }], exportAs: ["kendoColorGradient"], usesOnChanges: true, ngImport: i0, template: `
522
+ ], viewQueries: [{ propertyName: "gradientDragHandle", first: true, predicate: ["gradientDragHandle"], descendants: true, read: ElementRef }, { propertyName: "inputs", first: true, predicate: ["inputs"], descendants: true }, { propertyName: "alphaSlider", first: true, predicate: ["alphaSlider"], descendants: true }, { propertyName: "gradientWrapper", first: true, predicate: ["gradientWrapper"], descendants: true }, { propertyName: "hsvRectangle", first: true, predicate: ["hsvRectangle"], descendants: true }], exportAs: ["kendoColorGradient"], usesOnChanges: true, ngImport: i0, template: `
509
523
  <ng-container kendoColorGradientLocalizedMessages
510
524
  i18n-colorGradientNoColor="kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty."
511
525
  colorGradientNoColor="Colorgradient no color chosen"
@@ -527,7 +541,7 @@ ColorGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
527
541
  formatButton="Change color format">
528
542
  </ng-container>
529
543
  <div class="k-colorgradient-canvas k-hstack">
530
- <div class="k-hsv-rectangle" [style.background]="backgroundColor">
544
+ <div class="k-hsv-rectangle" #hsvRectangle>
531
545
  <div
532
546
  #gradientWrapper
533
547
  kendoDraggable
@@ -576,9 +590,9 @@ ColorGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
576
590
  [vertical]="true"
577
591
  [min]="0"
578
592
  [max]="360"
593
+ [value]="hsva.value.h"
579
594
  [smallStep]="5"
580
595
  [largeStep]="10"
581
- [value]="hsva.value.h"
582
596
  (valueChange)="handleHueSliderChange($event)"
583
597
  >
584
598
  </kendo-slider>
@@ -612,7 +626,8 @@ ColorGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
612
626
  (valueChange)="handleInputsValueChange($event)"
613
627
  >
614
628
  </kendo-colorinput>
615
- <div class="k-colorgradient-color-contrast k-vbox" *ngIf="contrastToolVisible"
629
+ <div class="k-colorgradient-color-contrast k-vbox"
630
+ *ngIf="contrastToolVisible"
616
631
  kendoContrastTool
617
632
  [value]="value"
618
633
  [ratio]="contrastTool">
@@ -665,7 +680,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
665
680
  formatButton="Change color format">
666
681
  </ng-container>
667
682
  <div class="k-colorgradient-canvas k-hstack">
668
- <div class="k-hsv-rectangle" [style.background]="backgroundColor">
683
+ <div class="k-hsv-rectangle" #hsvRectangle>
669
684
  <div
670
685
  #gradientWrapper
671
686
  kendoDraggable
@@ -714,9 +729,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
714
729
  [vertical]="true"
715
730
  [min]="0"
716
731
  [max]="360"
732
+ [value]="hsva.value.h"
717
733
  [smallStep]="5"
718
734
  [largeStep]="10"
719
- [value]="hsva.value.h"
720
735
  (valueChange)="handleHueSliderChange($event)"
721
736
  >
722
737
  </kendo-slider>
@@ -750,7 +765,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
750
765
  (valueChange)="handleInputsValueChange($event)"
751
766
  >
752
767
  </kendo-colorinput>
753
- <div class="k-colorgradient-color-contrast k-vbox" *ngIf="contrastToolVisible"
768
+ <div class="k-colorgradient-color-contrast k-vbox"
769
+ *ngIf="contrastToolVisible"
754
770
  kendoContrastTool
755
771
  [value]="value"
756
772
  [ratio]="contrastTool">
@@ -828,4 +844,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
828
844
  }], gradientWrapper: [{
829
845
  type: ViewChild,
830
846
  args: ['gradientWrapper', { static: false }]
847
+ }], hsvRectangle: [{
848
+ type: ViewChild,
849
+ args: ['hsvRectangle', { static: false }]
831
850
  }] } });
@@ -182,6 +182,7 @@ export class FlatColorPickerComponent {
182
182
  }
183
183
  ngOnChanges(changes) {
184
184
  if (isChanged('value', changes)) {
185
+ this.selection = this.value;
185
186
  this.setHostElementAriaLabel();
186
187
  }
187
188
  if (isChanged('paletteSettings', changes)) {
@@ -267,15 +268,7 @@ export class FlatColorPickerComponent {
267
268
  * @hidden
268
269
  */
269
270
  handleValueChange(color) {
270
- if (this.value === color) {
271
- return;
272
- }
273
- if (this.preview) {
274
- this.changeCurrentValue(color);
275
- }
276
- else {
277
- this.setFlatColorPickerValue(color);
278
- }
271
+ this.preview ? this.changeCurrentValue(color) : this.setFlatColorPickerValue(color);
279
272
  }
280
273
  /**
281
274
  * @hidden
package/esm2015/main.js CHANGED
@@ -29,7 +29,6 @@ export { ColorGradientComponent } from './colorpicker/color-gradient.component';
29
29
  export { ColorPickerModule } from './colorpicker.module';
30
30
  export * from './colorpicker/events';
31
31
  export { FlatColorPickerComponent } from './colorpicker/flatcolorpicker.component';
32
- export { ColorPickerCancelEvent } from './colorpicker/events';
33
32
  export { CheckBoxDirective } from './checkbox/checkbox.directive';
34
33
  export { RadioButtonDirective } from './radiobutton/radiobutton.directive';
35
34
  export { HintComponent } from './formfield/hint.component';
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-inputs',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1645006768,
12
+ publishDate: 1646911953,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -204,7 +204,7 @@ export class TextAreaDirective {
204
204
  }
205
205
  }
206
206
  TextAreaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TextAreaDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
207
- TextAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TextAreaDirective, selector: "textarea[kendoTextArea]", inputs: { autoSize: "autoSize", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.k-textarea": "this.elementClasses", "class.k-input": "this.elementClasses", "class.k-autofill": "this.autofillClass", "attr.dir": "this.direction" } }, providers: [{
207
+ TextAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TextAreaDirective, selector: "textarea[kendoTextArea]", inputs: { autoSize: "autoSize", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.k-textarea": "this.elementClasses", "class.k-input": "this.elementClasses", "class.k-input-md": "this.elementClasses", "class.k-rounded-md": "this.elementClasses", "class.k-input-solid": "this.elementClasses", "class.k-autofill": "this.autofillClass", "attr.dir": "this.direction" } }, providers: [{
208
208
  provide: NG_VALUE_ACCESSOR,
209
209
  useExisting: forwardRef(() => TextAreaDirective),
210
210
  multi: true
@@ -236,6 +236,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
236
236
  }, {
237
237
  type: HostBinding,
238
238
  args: ['class.k-input']
239
+ }, {
240
+ type: HostBinding,
241
+ args: ['class.k-input-md']
242
+ }, {
243
+ type: HostBinding,
244
+ args: ['class.k-rounded-md']
245
+ }, {
246
+ type: HostBinding,
247
+ args: ['class.k-input-solid']
239
248
  }], autofillClass: [{
240
249
  type: HostBinding,
241
250
  args: ['class.k-autofill']
@@ -299,11 +299,11 @@ export class TextAreaComponent extends TextFieldsBase {
299
299
  }
300
300
  if (changes.resizable) {
301
301
  if (this.resizable === 'auto') {
302
+ this.renderer.removeClass(element, '\!k-overflow-y-auto');
302
303
  this.initialHeight = element.offsetHeight;
303
304
  }
304
305
  else {
305
- this.renderer.setStyle(element, 'overflow-y', 'auto');
306
- this.renderer.setStyle(element, 'resize', 'both');
306
+ this.renderer.addClass(element, '\!k-overflow-y-auto');
307
307
  element.style.height = `${this.initialHeight}px`;
308
308
  }
309
309
  }
@@ -400,7 +400,6 @@ export class TextAreaComponent extends TextFieldsBase {
400
400
  return;
401
401
  }
402
402
  const element = this.input.nativeElement;
403
- this.renderer.setStyle(element, 'overflow-y', 'hidden');
404
403
  this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
405
404
  const scrollHeight = element.scrollHeight;
406
405
  if (scrollHeight > this.initialHeight) {
@@ -455,9 +454,9 @@ export class TextAreaComponent extends TextFieldsBase {
455
454
  const hostElement = this.hostElement.nativeElement;
456
455
  const element = this.input.nativeElement;
457
456
  const suffix = hostElement.children[1];
458
- this.renderer.setStyle(element, 'flex', isVertical ? 'none' : '1');
457
+ this.renderer[isVertical ? 'addClass' : 'removeClass'](element, '\!k-flex-none');
459
458
  if (suffix) {
460
- this.renderer.setStyle(suffix, 'align-items', isVertical ? 'center' : 'start');
459
+ this.renderer[isVertical ? 'removeClass' : 'addClass'](suffix, '\!k-align-items-start');
461
460
  }
462
461
  }
463
462
  }
@@ -495,7 +494,7 @@ TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
495
494
  input: handleInput}">
496
495
  </textarea>
497
496
  <ng-content select="kendo-textarea-suffix"></ng-content>
498
- `, isInline: true, styles: ["\n :host {\n display: inline-flex;\n }\n "], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
497
+ `, isInline: true, directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
499
498
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TextAreaComponent, decorators: [{
500
499
  type: Component,
501
500
  args: [{
@@ -535,12 +534,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
535
534
  input: handleInput}">
536
535
  </textarea>
537
536
  <ng-content select="kendo-textarea-suffix"></ng-content>
538
- `,
539
- styles: [`
540
- :host {
541
- display: inline-flex;
542
- }
543
- `]
537
+ `
544
538
  }]
545
539
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { focusableId: [{
546
540
  type: Input
@@ -88,7 +88,7 @@ export class TextBoxDirective {
88
88
  }
89
89
  }
90
90
  TextBoxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TextBoxDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
91
- TextBoxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TextBoxDirective, selector: "input[kendoTextBox]", inputs: { value: "value" }, host: { properties: { "class.k-textbox": "this.hostClasses", "class.k-input": "this.hostClasses" } }, providers: [{
91
+ TextBoxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TextBoxDirective, selector: "input[kendoTextBox]", inputs: { value: "value" }, host: { properties: { "class.k-textbox": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-input-md": "this.hostClasses", "class.k-rounded-md": "this.hostClasses", "class.k-input-solid": "this.hostClasses" } }, providers: [{
92
92
  provide: KendoInput,
93
93
  useExisting: forwardRef(() => TextBoxDirective)
94
94
  }], ngImport: i0 });
@@ -107,6 +107,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
107
107
  }, {
108
108
  type: HostBinding,
109
109
  args: ['class.k-input']
110
+ }, {
111
+ type: HostBinding,
112
+ args: ['class.k-input-md']
113
+ }, {
114
+ type: HostBinding,
115
+ args: ['class.k-rounded-md']
116
+ }, {
117
+ type: HostBinding,
118
+ args: ['class.k-input-solid']
110
119
  }], value: [{
111
120
  type: Input
112
121
  }] } });
@@ -519,7 +519,7 @@ const packageMetadata = {
519
519
  name: '@progress/kendo-angular-inputs',
520
520
  productName: 'Kendo UI for Angular',
521
521
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
522
- publishDate: 1645006768,
522
+ publishDate: 1646911953,
523
523
  version: '',
524
524
  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'
525
525
  };
@@ -2854,7 +2854,7 @@ class TextBoxDirective {
2854
2854
  }
2855
2855
  }
2856
2856
  TextBoxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TextBoxDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
2857
- TextBoxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TextBoxDirective, selector: "input[kendoTextBox]", inputs: { value: "value" }, host: { properties: { "class.k-textbox": "this.hostClasses", "class.k-input": "this.hostClasses" } }, providers: [{
2857
+ TextBoxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TextBoxDirective, selector: "input[kendoTextBox]", inputs: { value: "value" }, host: { properties: { "class.k-textbox": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-input-md": "this.hostClasses", "class.k-rounded-md": "this.hostClasses", "class.k-input-solid": "this.hostClasses" } }, providers: [{
2858
2858
  provide: KendoInput,
2859
2859
  useExisting: forwardRef(() => TextBoxDirective)
2860
2860
  }], ngImport: i0 });
@@ -2873,6 +2873,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
2873
2873
  }, {
2874
2874
  type: HostBinding,
2875
2875
  args: ['class.k-input']
2876
+ }, {
2877
+ type: HostBinding,
2878
+ args: ['class.k-input-md']
2879
+ }, {
2880
+ type: HostBinding,
2881
+ args: ['class.k-rounded-md']
2882
+ }, {
2883
+ type: HostBinding,
2884
+ args: ['class.k-input-solid']
2876
2885
  }], value: [{
2877
2886
  type: Input
2878
2887
  }] } });
@@ -3071,7 +3080,7 @@ class TextAreaDirective {
3071
3080
  }
3072
3081
  }
3073
3082
  TextAreaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TextAreaDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3074
- TextAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TextAreaDirective, selector: "textarea[kendoTextArea]", inputs: { autoSize: "autoSize", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.k-textarea": "this.elementClasses", "class.k-input": "this.elementClasses", "class.k-autofill": "this.autofillClass", "attr.dir": "this.direction" } }, providers: [{
3083
+ TextAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TextAreaDirective, selector: "textarea[kendoTextArea]", inputs: { autoSize: "autoSize", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "class.k-textarea": "this.elementClasses", "class.k-input": "this.elementClasses", "class.k-input-md": "this.elementClasses", "class.k-rounded-md": "this.elementClasses", "class.k-input-solid": "this.elementClasses", "class.k-autofill": "this.autofillClass", "attr.dir": "this.direction" } }, providers: [{
3075
3084
  provide: NG_VALUE_ACCESSOR,
3076
3085
  useExisting: forwardRef(() => TextAreaDirective),
3077
3086
  multi: true
@@ -3103,6 +3112,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
3103
3112
  }, {
3104
3113
  type: HostBinding,
3105
3114
  args: ['class.k-input']
3115
+ }, {
3116
+ type: HostBinding,
3117
+ args: ['class.k-input-md']
3118
+ }, {
3119
+ type: HostBinding,
3120
+ args: ['class.k-rounded-md']
3121
+ }, {
3122
+ type: HostBinding,
3123
+ args: ['class.k-input-solid']
3106
3124
  }], autofillClass: [{
3107
3125
  type: HostBinding,
3108
3126
  args: ['class.k-autofill']
@@ -7323,11 +7341,11 @@ class TextAreaComponent extends TextFieldsBase {
7323
7341
  }
7324
7342
  if (changes.resizable) {
7325
7343
  if (this.resizable === 'auto') {
7344
+ this.renderer.removeClass(element, '\!k-overflow-y-auto');
7326
7345
  this.initialHeight = element.offsetHeight;
7327
7346
  }
7328
7347
  else {
7329
- this.renderer.setStyle(element, 'overflow-y', 'auto');
7330
- this.renderer.setStyle(element, 'resize', 'both');
7348
+ this.renderer.addClass(element, '\!k-overflow-y-auto');
7331
7349
  element.style.height = `${this.initialHeight}px`;
7332
7350
  }
7333
7351
  }
@@ -7424,7 +7442,6 @@ class TextAreaComponent extends TextFieldsBase {
7424
7442
  return;
7425
7443
  }
7426
7444
  const element = this.input.nativeElement;
7427
- this.renderer.setStyle(element, 'overflow-y', 'hidden');
7428
7445
  this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
7429
7446
  const scrollHeight = element.scrollHeight;
7430
7447
  if (scrollHeight > this.initialHeight) {
@@ -7479,9 +7496,9 @@ class TextAreaComponent extends TextFieldsBase {
7479
7496
  const hostElement = this.hostElement.nativeElement;
7480
7497
  const element = this.input.nativeElement;
7481
7498
  const suffix = hostElement.children[1];
7482
- this.renderer.setStyle(element, 'flex', isVertical ? 'none' : '1');
7499
+ this.renderer[isVertical ? 'addClass' : 'removeClass'](element, '\!k-flex-none');
7483
7500
  if (suffix) {
7484
- this.renderer.setStyle(suffix, 'align-items', isVertical ? 'center' : 'start');
7501
+ this.renderer[isVertical ? 'removeClass' : 'addClass'](suffix, '\!k-align-items-start');
7485
7502
  }
7486
7503
  }
7487
7504
  }
@@ -7519,7 +7536,7 @@ TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
7519
7536
  input: handleInput}">
7520
7537
  </textarea>
7521
7538
  <ng-content select="kendo-textarea-suffix"></ng-content>
7522
- `, isInline: true, styles: ["\n :host {\n display: inline-flex;\n }\n "], directives: [{ type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
7539
+ `, isInline: true, directives: [{ type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
7523
7540
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TextAreaComponent, decorators: [{
7524
7541
  type: Component,
7525
7542
  args: [{
@@ -7559,12 +7576,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
7559
7576
  input: handleInput}">
7560
7577
  </textarea>
7561
7578
  <ng-content select="kendo-textarea-suffix"></ng-content>
7562
- `,
7563
- styles: [`
7564
- :host {
7565
- display: inline-flex;
7566
- }
7567
- `]
7579
+ `
7568
7580
  }]
7569
7581
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { focusableId: [{
7570
7582
  type: Input
@@ -9120,6 +9132,8 @@ class ColorGradientComponent {
9120
9132
  this.hsva = new BehaviorSubject({});
9121
9133
  this._tabindex = 0;
9122
9134
  this.listeners = [];
9135
+ this.hueSliderTouched = false;
9136
+ this.alphaSliderTouched = false;
9123
9137
  this.updateValues = new Subject();
9124
9138
  this.notifyNgChanged = () => { };
9125
9139
  this.notifyNgTouched = () => { };
@@ -9331,7 +9345,9 @@ class ColorGradientComponent {
9331
9345
  this.hsva.next(hsva);
9332
9346
  this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
9333
9347
  this.backgroundColor = getColorFromHue(hue);
9348
+ this.setBackgroundColor(this.backgroundColor);
9334
9349
  this.setAlphaSliderBackground(this.backgroundColor);
9350
+ this.hueSliderTouched = true;
9335
9351
  }
9336
9352
  /**
9337
9353
  * @hidden
@@ -9341,6 +9357,7 @@ class ColorGradientComponent {
9341
9357
  hsva.a = alpha / 100;
9342
9358
  this.hsva.next(hsva);
9343
9359
  this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
9360
+ this.alphaSliderTouched = true;
9344
9361
  }
9345
9362
  /**
9346
9363
  * @hidden
@@ -9432,19 +9449,6 @@ class ColorGradientComponent {
9432
9449
  this.updateValues.next(getColorFromHSV(this.hsva.value, this.format, this.opacity));
9433
9450
  this.setAlphaSliderBackground(getColorFromHSV(Object.assign(Object.assign({}, this.hsva.value), { a: 1 }), this.format, this.opacity));
9434
9451
  }
9435
- updateUI() {
9436
- if (!isDocumentAvailable()) {
9437
- return;
9438
- }
9439
- this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
9440
- const gradientRect = this.gradientRect;
9441
- const top = (1 - this.hsva.value.v) * gradientRect.height;
9442
- const left = this.hsva.value.s * gradientRect.width;
9443
- this.setDragHandleElementPosition(top, left);
9444
- this.backgroundColor = getColorFromHue(this.hsva.value.h);
9445
- this.setAlphaSliderBackground(this.backgroundColor);
9446
- this.setHostElementAriaLabel();
9447
- }
9448
9452
  handleValueChange(color) {
9449
9453
  if (this.value === color) {
9450
9454
  return;
@@ -9470,6 +9474,28 @@ class ColorGradientComponent {
9470
9474
  const parsed = parseColor(this.value, this.format, this.opacity);
9471
9475
  this.renderer.setAttribute(this.host.nativeElement, 'aria-label', `${this.value ? parsed : this.localizationService.get('colorGradientNoColor')}`);
9472
9476
  }
9477
+ setBackgroundColor(color) {
9478
+ this.renderer.setStyle(this.hsvRectangle.nativeElement, 'background', color);
9479
+ }
9480
+ updateUI() {
9481
+ if (!isDocumentAvailable()) {
9482
+ return;
9483
+ }
9484
+ if (this.hueSliderTouched || this.alphaSliderTouched) {
9485
+ this.hueSliderTouched = false;
9486
+ this.alphaSliderTouched = false;
9487
+ return;
9488
+ }
9489
+ this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
9490
+ const gradientRect = this.gradientRect;
9491
+ const top = (1 - this.hsva.value.v) * gradientRect.height;
9492
+ const left = this.hsva.value.s * gradientRect.width;
9493
+ this.setDragHandleElementPosition(top, left);
9494
+ this.backgroundColor = getColorFromHue(this.hsva.value.h);
9495
+ this.setBackgroundColor(this.backgroundColor);
9496
+ this.setAlphaSliderBackground(this.backgroundColor);
9497
+ this.setHostElementAriaLabel();
9498
+ }
9473
9499
  addEventListeners() {
9474
9500
  this.ngZone.runOutsideAngular(() => {
9475
9501
  const focusOutListener = this.renderer.listen(this.host.nativeElement, 'focusout', (event) => {
@@ -9526,7 +9552,7 @@ ColorGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
9526
9552
  provide: L10N_PREFIX,
9527
9553
  useValue: 'kendo.colorgradient'
9528
9554
  }
9529
- ], viewQueries: [{ propertyName: "gradientDragHandle", first: true, predicate: ["gradientDragHandle"], descendants: true, read: ElementRef }, { propertyName: "inputs", first: true, predicate: ["inputs"], descendants: true }, { propertyName: "alphaSlider", first: true, predicate: ["alphaSlider"], descendants: true }, { propertyName: "gradientWrapper", first: true, predicate: ["gradientWrapper"], descendants: true }], exportAs: ["kendoColorGradient"], usesOnChanges: true, ngImport: i0, template: `
9555
+ ], viewQueries: [{ propertyName: "gradientDragHandle", first: true, predicate: ["gradientDragHandle"], descendants: true, read: ElementRef }, { propertyName: "inputs", first: true, predicate: ["inputs"], descendants: true }, { propertyName: "alphaSlider", first: true, predicate: ["alphaSlider"], descendants: true }, { propertyName: "gradientWrapper", first: true, predicate: ["gradientWrapper"], descendants: true }, { propertyName: "hsvRectangle", first: true, predicate: ["hsvRectangle"], descendants: true }], exportAs: ["kendoColorGradient"], usesOnChanges: true, ngImport: i0, template: `
9530
9556
  <ng-container kendoColorGradientLocalizedMessages
9531
9557
  i18n-colorGradientNoColor="kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty."
9532
9558
  colorGradientNoColor="Colorgradient no color chosen"
@@ -9548,7 +9574,7 @@ ColorGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
9548
9574
  formatButton="Change color format">
9549
9575
  </ng-container>
9550
9576
  <div class="k-colorgradient-canvas k-hstack">
9551
- <div class="k-hsv-rectangle" [style.background]="backgroundColor">
9577
+ <div class="k-hsv-rectangle" #hsvRectangle>
9552
9578
  <div
9553
9579
  #gradientWrapper
9554
9580
  kendoDraggable
@@ -9597,9 +9623,9 @@ ColorGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
9597
9623
  [vertical]="true"
9598
9624
  [min]="0"
9599
9625
  [max]="360"
9626
+ [value]="hsva.value.h"
9600
9627
  [smallStep]="5"
9601
9628
  [largeStep]="10"
9602
- [value]="hsva.value.h"
9603
9629
  (valueChange)="handleHueSliderChange($event)"
9604
9630
  >
9605
9631
  </kendo-slider>
@@ -9633,7 +9659,8 @@ ColorGradientComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
9633
9659
  (valueChange)="handleInputsValueChange($event)"
9634
9660
  >
9635
9661
  </kendo-colorinput>
9636
- <div class="k-colorgradient-color-contrast k-vbox" *ngIf="contrastToolVisible"
9662
+ <div class="k-colorgradient-color-contrast k-vbox"
9663
+ *ngIf="contrastToolVisible"
9637
9664
  kendoContrastTool
9638
9665
  [value]="value"
9639
9666
  [ratio]="contrastTool">
@@ -9686,7 +9713,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
9686
9713
  formatButton="Change color format">
9687
9714
  </ng-container>
9688
9715
  <div class="k-colorgradient-canvas k-hstack">
9689
- <div class="k-hsv-rectangle" [style.background]="backgroundColor">
9716
+ <div class="k-hsv-rectangle" #hsvRectangle>
9690
9717
  <div
9691
9718
  #gradientWrapper
9692
9719
  kendoDraggable
@@ -9735,9 +9762,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
9735
9762
  [vertical]="true"
9736
9763
  [min]="0"
9737
9764
  [max]="360"
9765
+ [value]="hsva.value.h"
9738
9766
  [smallStep]="5"
9739
9767
  [largeStep]="10"
9740
- [value]="hsva.value.h"
9741
9768
  (valueChange)="handleHueSliderChange($event)"
9742
9769
  >
9743
9770
  </kendo-slider>
@@ -9771,7 +9798,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
9771
9798
  (valueChange)="handleInputsValueChange($event)"
9772
9799
  >
9773
9800
  </kendo-colorinput>
9774
- <div class="k-colorgradient-color-contrast k-vbox" *ngIf="contrastToolVisible"
9801
+ <div class="k-colorgradient-color-contrast k-vbox"
9802
+ *ngIf="contrastToolVisible"
9775
9803
  kendoContrastTool
9776
9804
  [value]="value"
9777
9805
  [ratio]="contrastTool">
@@ -9849,6 +9877,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
9849
9877
  }], gradientWrapper: [{
9850
9878
  type: ViewChild,
9851
9879
  args: ['gradientWrapper', { static: false }]
9880
+ }], hsvRectangle: [{
9881
+ type: ViewChild,
9882
+ args: ['hsvRectangle', { static: false }]
9852
9883
  }] } });
9853
9884
 
9854
9885
  /**
@@ -10695,6 +10726,7 @@ class FlatColorPickerComponent {
10695
10726
  }
10696
10727
  ngOnChanges(changes) {
10697
10728
  if (isChanged('value', changes)) {
10729
+ this.selection = this.value;
10698
10730
  this.setHostElementAriaLabel();
10699
10731
  }
10700
10732
  if (isChanged('paletteSettings', changes)) {
@@ -10780,15 +10812,7 @@ class FlatColorPickerComponent {
10780
10812
  * @hidden
10781
10813
  */
10782
10814
  handleValueChange(color) {
10783
- if (this.value === color) {
10784
- return;
10785
- }
10786
- if (this.preview) {
10787
- this.changeCurrentValue(color);
10788
- }
10789
- else {
10790
- this.setFlatColorPickerValue(color);
10791
- }
10815
+ this.preview ? this.changeCurrentValue(color) : this.setFlatColorPickerValue(color);
10792
10816
  }
10793
10817
  /**
10794
10818
  * @hidden
package/main.d.ts CHANGED
@@ -37,7 +37,6 @@ export { ColorPickerView } from './colorpicker/models';
37
37
  export { GradientSettings } from './colorpicker/models';
38
38
  export { FlatColorPickerComponent } from './colorpicker/flatcolorpicker.component';
39
39
  export { ColorPickerActionsLayout } from './colorpicker/models/actions-layout';
40
- export { ColorPickerCancelEvent } from './colorpicker/events';
41
40
  export { CheckBoxDirective } from './checkbox/checkbox.directive';
42
41
  export { RadioButtonDirective } from './radiobutton/radiobutton.directive';
43
42
  export { HintComponent } from './formfield/hint.component';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-inputs",
3
- "version": "9.0.0-next.202202161022",
3
+ "version": "9.0.0-next.202203101134",
4
4
  "description": "Inputs Package for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",