@progress/kendo-angular-inputs 8.0.0 → 8.0.2-dev.202201241505

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 (31) 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/colorpicker/color-input.component.js +1 -1
  4. package/dist/es/colorpicker/colorpicker.component.js +12 -10
  5. package/dist/es/colorpicker/flatcolorpicker-actions.component.js +1 -1
  6. package/dist/es/colorpicker/flatcolorpicker-header.component.js +1 -1
  7. package/dist/es/index.js +0 -2
  8. package/dist/es/main.js +2 -0
  9. package/dist/es/package-metadata.js +1 -1
  10. package/dist/es2015/colorpicker/color-input.component.js +1 -0
  11. package/dist/es2015/colorpicker/colorpicker.component.d.ts +0 -4
  12. package/dist/es2015/colorpicker/colorpicker.component.js +12 -11
  13. package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +2 -0
  14. package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +2 -0
  15. package/dist/es2015/index.d.ts +0 -2
  16. package/dist/es2015/index.js +0 -2
  17. package/dist/es2015/index.metadata.json +1 -1
  18. package/dist/es2015/main.d.ts +2 -0
  19. package/dist/es2015/main.js +2 -0
  20. package/dist/es2015/package-metadata.js +1 -1
  21. package/dist/fesm2015/index.js +19 -13
  22. package/dist/fesm5/index.js +17 -15
  23. package/dist/npm/colorpicker/color-input.component.js +1 -1
  24. package/dist/npm/colorpicker/colorpicker.component.js +12 -10
  25. package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +1 -1
  26. package/dist/npm/colorpicker/flatcolorpicker-header.component.js +1 -1
  27. package/dist/npm/index.js +0 -4
  28. package/dist/npm/main.js +4 -0
  29. package/dist/npm/package-metadata.js +1 -1
  30. package/dist/systemjs/kendo-angular-inputs.js +1 -1
  31. package/package.json +1 -1
@@ -182,7 +182,7 @@ var ColorInputComponent = /** @class */ (function () {
182
182
  ColorInputComponent = tslib_1.__decorate([
183
183
  Component({
184
184
  selector: 'kendo-colorinput',
185
- 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 "
185
+ 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 type=\"button\"\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 "
186
186
  }),
187
187
  tslib_1.__metadata("design:paramtypes", [ElementRef,
188
188
  Renderer2,
@@ -475,12 +475,6 @@ var ColorPickerComponent = /** @class */ (function () {
475
475
  _this.isFocused = false;
476
476
  });
477
477
  };
478
- /**
479
- * @hidden
480
- */
481
- ColorPickerComponent.prototype.arrowButtonMouseDown = function (ev) {
482
- ev.preventDefault();
483
- };
484
478
  /**
485
479
  * Clears the value of the ColorPicker.
486
480
  */
@@ -502,6 +496,7 @@ var ColorPickerComponent = /** @class */ (function () {
502
496
  if (this.disabled || this.readonly) {
503
497
  return;
504
498
  }
499
+ this.cdr.markForCheck();
505
500
  this.closePopup();
506
501
  open = isPresent(open) ? open : !this.isOpen;
507
502
  if (open) {
@@ -639,7 +634,8 @@ var ColorPickerComponent = /** @class */ (function () {
639
634
  var _this = this;
640
635
  this.ngZone.onStable.pipe(take(1)).subscribe(function () {
641
636
  if (_this.flatColorPicker) {
642
- var elementToFocus = _this.flatColorPicker.gradient ? _this.flatColorPicker.gradient.gradientDragHandle :
637
+ var gradient = _this.flatColorPicker.gradient;
638
+ var elementToFocus = gradient ? gradient.gradientDragHandle :
643
639
  _this.flatColorPicker.palette.host;
644
640
  elementToFocus.nativeElement.focus();
645
641
  }
@@ -679,7 +675,8 @@ var ColorPickerComponent = /** @class */ (function () {
679
675
  Object.defineProperty(ColorPickerComponent.prototype, "firstFocusableElement", {
680
676
  get: function () {
681
677
  if (!this.flatColorPicker.header || (this.views.length <= 1 && !this.flatColorPicker.clearButton)) {
682
- return this.flatColorPicker.gradient ? this.flatColorPicker.gradient.gradientDragHandle : this.flatColorPicker.palette.host;
678
+ var gradient = this.flatColorPicker.gradient;
679
+ return gradient ? gradient.gradientDragHandle : this.flatColorPicker.palette.host;
683
680
  }
684
681
  return this.views.length > 1 ? this.flatColorPicker.header.viewButtonsCollection.toArray()[0] : this.flatColorPicker.header.clearButtonElement;
685
682
  },
@@ -694,7 +691,12 @@ var ColorPickerComponent = /** @class */ (function () {
694
691
  if (this.flatColorPicker.palette) {
695
692
  return this.flatColorPicker.palette.host;
696
693
  }
697
- return this.gradientSettings.opacity ? this.flatColorPicker.gradient.inputs.opacityInput.numericInput : this.flatColorPicker.gradient.inputs.blueInput;
694
+ var gradient = this.flatColorPicker.gradient;
695
+ var inputs = gradient && gradient.inputs;
696
+ if (gradient && inputs && inputs.formatView === 'hex') {
697
+ return inputs.hexInput;
698
+ }
699
+ return this.gradientSettings.opacity ? inputs.opacityInput.numericInput : inputs.blueInput;
698
700
  },
699
701
  enumerable: true,
700
702
  configurable: true
@@ -942,7 +944,7 @@ var ColorPickerComponent = /** @class */ (function () {
942
944
  useValue: 'kendo.colorpicker'
943
945
  }
944
946
  ],
945
- 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 "
947
+ 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 tabindex=\"-1\"\n type=\"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 "
946
948
  }),
947
949
  tslib_1.__metadata("design:paramtypes", [ElementRef,
948
950
  PopupService,
@@ -41,7 +41,7 @@ var FlatColorPickerActionButtonsComponent = /** @class */ (function () {
41
41
  FlatColorPickerActionButtonsComponent = tslib_1.__decorate([
42
42
  Component({
43
43
  selector: '[kendoFlatColorPickerActionButtons]',
44
- 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 "
44
+ 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 type=\"button\"\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 type=\"button\"\n >{{getText('applyButton')}}</button>\n "
45
45
  }),
46
46
  tslib_1.__metadata("design:paramtypes", [LocalizationService])
47
47
  ], FlatColorPickerActionButtonsComponent);
@@ -85,7 +85,7 @@ var FlatColorPickerHeaderComponent = /** @class */ (function () {
85
85
  FlatColorPickerHeaderComponent = tslib_1.__decorate([
86
86
  Component({
87
87
  selector: '[kendoFlatColorPickerHeader]',
88
- 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 "
88
+ 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 type=\"button\"\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 type=\"button\"\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 "
89
89
  }),
90
90
  tslib_1.__metadata("design:paramtypes", [LocalizationService])
91
91
  ], FlatColorPickerHeaderComponent);
package/dist/es/index.js CHANGED
@@ -6,7 +6,6 @@
6
6
  * Generated bundle index. Do not edit.
7
7
  */
8
8
  export * from './main';
9
- export { CheckBoxModule } from './checkbox.module';
10
9
  export { ColorContrastSvgComponent } from './colorpicker/color-contrast-svg.component';
11
10
  export { ColorInputComponent } from './colorpicker/color-input.component';
12
11
  export { ContrastValidationComponent } from './colorpicker/contrast-validation.component';
@@ -24,7 +23,6 @@ export { ColorPaletteService } from './colorpicker/services/color-palette.servic
24
23
  export { FlatColorPickerService } from './colorpicker/services/flatcolorpicker.service';
25
24
  export { MaskingService } from './maskedtextbox/masking.service';
26
25
  export { NumericTextBoxMessages } from './numerictextbox/localization/messages';
27
- export { RadioButtonModule } from './radiobutton.module';
28
26
  export { RangeSliderCustomMessagesComponent } from './rangeslider/localization/custom-messages.component';
29
27
  export { RangeSliderMessages } from './rangeslider/localization/messages';
30
28
  export { SHARED_DIRECTIVES } from './shared.module';
package/dist/es/main.js CHANGED
@@ -20,6 +20,8 @@ export { NumericTextBoxModule } from './numerictextbox.module';
20
20
  export { MaskedTextBoxModule } from './maskedtextbox.module';
21
21
  export { TextBoxModule } from './textbox.module';
22
22
  export { TextAreaModule } from './textarea.module';
23
+ export { CheckBoxModule } from './checkbox.module';
24
+ export { RadioButtonModule } from './radiobutton.module';
23
25
  // All ColorPicker Components
24
26
  export { ColorPickerComponent } from './colorpicker/colorpicker.component';
25
27
  export { ColorPaletteComponent } from './colorpicker/color-palette.component';
@@ -9,7 +9,7 @@ export var packageMetadata = {
9
9
  name: '@progress/kendo-angular-inputs',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1642572427,
12
+ publishDate: 1643036475,
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
  };
@@ -175,6 +175,7 @@ ColorInputComponent = tslib_1.__decorate([
175
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
+ type="button"
178
179
  >
179
180
  <span class="k-button-icon k-icon k-i-arrows-kpi"></span>
180
181
  </button>
@@ -280,10 +280,6 @@ export declare class ColorPickerComponent implements OnInit, AfterViewInit, OnCh
280
280
  * @hidden
281
281
  */
282
282
  handleWrapperBlur(): void;
283
- /**
284
- * @hidden
285
- */
286
- arrowButtonMouseDown(ev: MouseEvent): void;
287
283
  /**
288
284
  * Clears the value of the ColorPicker.
289
285
  */
@@ -405,12 +405,6 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
405
405
  this.isFocused = false;
406
406
  });
407
407
  }
408
- /**
409
- * @hidden
410
- */
411
- arrowButtonMouseDown(ev) {
412
- ev.preventDefault();
413
- }
414
408
  /**
415
409
  * Clears the value of the ColorPicker.
416
410
  */
@@ -432,6 +426,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
432
426
  if (this.disabled || this.readonly) {
433
427
  return;
434
428
  }
429
+ this.cdr.markForCheck();
435
430
  this.closePopup();
436
431
  open = isPresent(open) ? open : !this.isOpen;
437
432
  if (open) {
@@ -566,7 +561,8 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
566
561
  focusFirstElement() {
567
562
  this.ngZone.onStable.pipe(take(1)).subscribe(() => {
568
563
  if (this.flatColorPicker) {
569
- const elementToFocus = this.flatColorPicker.gradient ? this.flatColorPicker.gradient.gradientDragHandle :
564
+ const gradient = this.flatColorPicker.gradient;
565
+ const elementToFocus = gradient ? gradient.gradientDragHandle :
570
566
  this.flatColorPicker.palette.host;
571
567
  elementToFocus.nativeElement.focus();
572
568
  }
@@ -604,7 +600,8 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
604
600
  }
605
601
  get firstFocusableElement() {
606
602
  if (!this.flatColorPicker.header || (this.views.length <= 1 && !this.flatColorPicker.clearButton)) {
607
- return this.flatColorPicker.gradient ? this.flatColorPicker.gradient.gradientDragHandle : this.flatColorPicker.palette.host;
603
+ const gradient = this.flatColorPicker.gradient;
604
+ return gradient ? gradient.gradientDragHandle : this.flatColorPicker.palette.host;
608
605
  }
609
606
  return this.views.length > 1 ? this.flatColorPicker.header.viewButtonsCollection.toArray()[0] : this.flatColorPicker.header.clearButtonElement;
610
607
  }
@@ -615,7 +612,12 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
615
612
  if (this.flatColorPicker.palette) {
616
613
  return this.flatColorPicker.palette.host;
617
614
  }
618
- return this.gradientSettings.opacity ? this.flatColorPicker.gradient.inputs.opacityInput.numericInput : this.flatColorPicker.gradient.inputs.blueInput;
615
+ const gradient = this.flatColorPicker.gradient;
616
+ const inputs = gradient && gradient.inputs;
617
+ if (gradient && inputs && inputs.formatView === 'hex') {
618
+ return inputs.hexInput;
619
+ }
620
+ return this.gradientSettings.opacity ? inputs.opacityInput.numericInput : inputs.blueInput;
619
621
  }
620
622
  handleDomEvents(action, events) {
621
623
  const hostElement = this.host.nativeElement;
@@ -902,9 +904,8 @@ ColorPickerComponent = ColorPickerComponent_1 = tslib_1.__decorate([
902
904
  </span>
903
905
  </span>
904
906
  <button
905
- #arrowButton
906
907
  tabindex="-1"
907
- role="button"
908
+ type="button"
908
909
  class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button">
909
910
  <span class="k-button-icon k-icon k-i-arrow-s"></span>
910
911
  </button>
@@ -47,11 +47,13 @@ FlatColorPickerActionButtonsComponent = tslib_1.__decorate([
47
47
  class="k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base"
48
48
  [attr.title]="getText('cancelButton')"
49
49
  (click)="onActionButtonClick('cancel', $event)"
50
+ type="button"
50
51
  >{{getText('cancelButton')}}</button>
51
52
  <button #last
52
53
  class="k-coloreditor-apply k-button k-button-md k-button-solid k-button-solid-primary"
53
54
  [attr.title]="getText('applyButton')"
54
55
  (click)="onActionButtonClick('apply', $event)"
56
+ type="button"
55
57
  >{{getText('applyButton')}}</button>
56
58
  `
57
59
  }),
@@ -87,6 +87,7 @@ FlatColorPickerHeaderComponent = tslib_1.__decorate([
87
87
  <div *ngIf="viewButtons" class="k-button-group k-button-group-flat">
88
88
  <button *ngFor="let view of views"
89
89
  #viewButtons
90
+ type="button"
90
91
  (click)="onViewButtonClick(view)"
91
92
  class="k-button k-button-md k-button-flat k-button-flat-base k-icon-button"
92
93
  [attr.title]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
@@ -105,6 +106,7 @@ FlatColorPickerHeaderComponent = tslib_1.__decorate([
105
106
  <div class="k-coloreditor-header-actions k-hstack">
106
107
  <button *ngIf="clearButton"
107
108
  #clearButton
109
+ type="button"
108
110
  class="k-button k-button-md k-button-flat k-button-flat-base k-icon-button k-coloreditor-reset"
109
111
  [attr.aria-label]="getText('clearButton')"
110
112
  [attr.title]="getText('clearButton')"
@@ -6,7 +6,6 @@
6
6
  * Generated bundle index. Do not edit.
7
7
  */
8
8
  export * from './main';
9
- export { CheckBoxModule } from './checkbox.module';
10
9
  export { ColorContrastSvgComponent } from './colorpicker/color-contrast-svg.component';
11
10
  export { ColorInputComponent } from './colorpicker/color-input.component';
12
11
  export { ContrastValidationComponent } from './colorpicker/contrast-validation.component';
@@ -24,7 +23,6 @@ export { ColorPaletteService } from './colorpicker/services/color-palette.servic
24
23
  export { FlatColorPickerService } from './colorpicker/services/flatcolorpicker.service';
25
24
  export { MaskingService } from './maskedtextbox/masking.service';
26
25
  export { NumericTextBoxMessages } from './numerictextbox/localization/messages';
27
- export { RadioButtonModule } from './radiobutton.module';
28
26
  export { RangeSliderCustomMessagesComponent } from './rangeslider/localization/custom-messages.component';
29
27
  export { RangeSliderMessages } from './rangeslider/localization/messages';
30
28
  export { SHARED_DIRECTIVES } from './shared.module';
@@ -6,7 +6,6 @@
6
6
  * Generated bundle index. Do not edit.
7
7
  */
8
8
  export * from './main';
9
- export { CheckBoxModule } from './checkbox.module';
10
9
  export { ColorContrastSvgComponent } from './colorpicker/color-contrast-svg.component';
11
10
  export { ColorInputComponent } from './colorpicker/color-input.component';
12
11
  export { ContrastValidationComponent } from './colorpicker/contrast-validation.component';
@@ -24,7 +23,6 @@ export { ColorPaletteService } from './colorpicker/services/color-palette.servic
24
23
  export { FlatColorPickerService } from './colorpicker/services/flatcolorpicker.service';
25
24
  export { MaskingService } from './maskedtextbox/masking.service';
26
25
  export { NumericTextBoxMessages } from './numerictextbox/localization/messages';
27
- export { RadioButtonModule } from './radiobutton.module';
28
26
  export { RangeSliderCustomMessagesComponent } from './rangeslider/localization/custom-messages.component';
29
27
  export { RangeSliderMessages } from './rangeslider/localization/messages';
30
28
  export { SHARED_DIRECTIVES } from './shared.module';