@progress/kendo-angular-inputs 21.1.1-develop.1 → 21.2.0-develop.1

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 (28) hide show
  1. package/esm2022/colorpicker/adaptiveness/adaptive-renderer.component.mjs +105 -97
  2. package/esm2022/colorpicker/color-contrast-svg.component.mjs +10 -7
  3. package/esm2022/colorpicker/color-gradient.component.mjs +287 -279
  4. package/esm2022/colorpicker/color-input.component.mjs +242 -235
  5. package/esm2022/colorpicker/color-palette.component.mjs +47 -39
  6. package/esm2022/colorpicker/colorpicker.component.mjs +228 -222
  7. package/esm2022/colorpicker/contrast-validation.component.mjs +26 -21
  8. package/esm2022/colorpicker/contrast.component.mjs +46 -37
  9. package/esm2022/colorpicker/flatcolorpicker-header.component.mjs +105 -95
  10. package/esm2022/colorpicker/flatcolorpicker.component.mjs +167 -157
  11. package/esm2022/form/form.component.mjs +13 -9
  12. package/esm2022/formfield/formfield.component.mjs +18 -11
  13. package/esm2022/formfieldset/formfieldset.component.mjs +15 -11
  14. package/esm2022/maskedtextbox/maskedtextbox.component.mjs +77 -61
  15. package/esm2022/numerictextbox/numerictextbox.component.mjs +133 -113
  16. package/esm2022/otpinput/otpinput-separator.component.mjs +25 -15
  17. package/esm2022/otpinput/otpinput.component.mjs +116 -109
  18. package/esm2022/package-metadata.mjs +2 -2
  19. package/esm2022/rangeslider/rangeslider.component.mjs +114 -113
  20. package/esm2022/rating/rating.component.mjs +273 -271
  21. package/esm2022/signature/signature.component.mjs +170 -161
  22. package/esm2022/slider/slider.component.mjs +130 -125
  23. package/esm2022/sliders-common/slider-ticks.component.mjs +43 -31
  24. package/esm2022/textarea/textarea.component.mjs +73 -69
  25. package/esm2022/textbox/textbox.component.mjs +145 -123
  26. package/fesm2022/progress-kendo-angular-inputs.mjs +2599 -2393
  27. package/package.json +12 -12
  28. package/schematics/ngAdd/index.js +4 -0
@@ -21,7 +21,7 @@ import { packageMetadata } from '../package-metadata';
21
21
  import { dropletSlashIcon } from '@progress/kendo-svg-icons';
22
22
  import { ContrastComponent } from './contrast.component';
23
23
  import { ColorContrastSvgComponent } from './color-contrast-svg.component';
24
- import { NgIf, NgClass } from '@angular/common';
24
+ import { NgClass } from '@angular/common';
25
25
  import { LocalizedColorPickerMessagesDirective } from './localization/localized-colorpicker-messages.directive';
26
26
  import { ButtonComponent } from '@progress/kendo-angular-buttons';
27
27
  import * as i0 from "@angular/core";
@@ -642,7 +642,7 @@ export class ColorGradientComponent {
642
642
  }
643
643
  }
644
644
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorGradientComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
645
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ColorGradientComponent, isStandalone: true, selector: "kendo-colorgradient", inputs: { adaptiveMode: "adaptiveMode", id: "id", opacity: "opacity", size: "size", disabled: "disabled", readonly: "readonly", clearButton: "clearButton", delay: "delay", value: "value", contrastTool: "contrastTool", tabindex: "tabindex", format: "format", gradientSliderStep: "gradientSliderStep", gradientSliderSmallStep: "gradientSliderSmallStep", ariaAttributesEnabled: "ariaAttributesEnabled" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "keydown.enter": "enterHandler($event)", "keydown.escape": "escapeHandler($event)", "focusin": "focusHandler($event)" }, properties: { "class.k-colorgradient": "this.hostClasses", "attr.aria-readonly": "this.readonlyAttribute", "class.k-disabled": "this.disabledClass", "attr.id": "this.gradientId", "attr.dir": "this.direction", "attr.tabindex": "this.hostTabindex", "attr.role": "this.ariaRole", "attr.aria-invalid": "this.isControlInvalid", "attr.aria-disabled": "this.isDisabled", "class.k-readonly": "this.readonly" } }, providers: [
645
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ColorGradientComponent, isStandalone: true, selector: "kendo-colorgradient", inputs: { adaptiveMode: "adaptiveMode", id: "id", opacity: "opacity", size: "size", disabled: "disabled", readonly: "readonly", clearButton: "clearButton", delay: "delay", value: "value", contrastTool: "contrastTool", tabindex: "tabindex", format: "format", gradientSliderStep: "gradientSliderStep", gradientSliderSmallStep: "gradientSliderSmallStep", ariaAttributesEnabled: "ariaAttributesEnabled" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "keydown.enter": "enterHandler($event)", "keydown.escape": "escapeHandler($event)", "focusin": "focusHandler($event)" }, properties: { "class.k-colorgradient": "this.hostClasses", "attr.aria-readonly": "this.readonlyAttribute", "class.k-disabled": "this.disabledClass", "attr.id": "this.gradientId", "attr.dir": "this.direction", "attr.tabindex": "this.hostTabindex", "attr.role": "this.ariaRole", "attr.aria-invalid": "this.isControlInvalid", "attr.aria-disabled": "this.isDisabled", "class.k-readonly": "this.readonly" } }, providers: [
646
646
  {
647
647
  multi: true,
648
648
  provide: NG_VALUE_ACCESSOR,
@@ -663,165 +663,169 @@ export class ColorGradientComponent {
663
663
  }
664
664
  ], viewQueries: [{ propertyName: "gradientDragHandle", first: true, predicate: ["gradientDragHandle"], descendants: true }, { 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: `
665
665
  <ng-container kendoColorGradientLocalizedMessages
666
- i18n-colorGradientNoColor="kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty."
667
- colorGradientNoColor="Colorgradient no color chosen"
668
- i18n-colorGradientHandle="kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser."
669
- colorGradientHandle="Choose color"
670
- i18n-clearButton="kendo.colorgradient.clearButton|The title for the clear button."
671
- clearButton="Clear value"
672
- i18n-hueSliderHandle="kendo.colorgradient.hueSliderHandle|The title for the hue slider handle."
673
- hueSliderHandle="Set hue"
674
- i18n-opacitySliderHandle="kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle."
675
- opacitySliderHandle="Set opacity"
676
- i18n-passContrast="kendo.colorgradient.passContrast|The pass message for the contrast tool."
677
- passContrast="Pass"
678
- i18n-failContrast="kendo.colorgradient.failContrast|The fail message for the contrast tool."
679
- failContrast="Fail"
680
- i18n-contrastRatio="kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool."
681
- contrastRatio="Contrast ratio"
682
- i18n-formatButton="kendo.colorgradient.formatButton|The message for the input format toggle button."
683
- formatButton="Change color format"
684
- i18n-redChannelLabel="kendo.colorgradient.redChannelLabel|The label of the NumericTextBox representing the red color channel."
685
- redChannelLabel="Red channel"
686
- i18n-greenChannelLabel="kendo.colorgradient.greenChannelLabel|The label of the NumericTextBox representing the green color channel."
687
- greenChannelLabel="Green channel"
688
- i18n-blueChannelLabel="kendo.colorgradient.blueChannelLabel|The label of the NumericTextBox representing the blue color channel."
689
- blueChannelLabel="Blue channel"
690
- i18n-alphaChannelLabel="kendo.colorgradient.alphaChannelLabel|The label of the NumericTextBox representing the alpha color channel."
691
- alphaChannelLabel="Alpha channel"
692
- i18n-redInputPlaceholder="kendo.colorgradient.redInputPlaceholder|The placeholder for the red color input."
693
- redChannelLabel="R"
694
- i18n-greenInputPlaceholder="kendo.colorgradient.greenInputPlaceholder|The placeholder for the green color input."
695
- greenInputPlaceholder="G"
696
- i18n-blueInputPlaceholder="kendo.colorgradient.blueInputPlaceholder|The placeholder for the blue color input."
697
- blueInputPlaceholder="B"
698
- i18n-hexInputPlaceholder="kendo.colorgradient.hexInputPlaceholder|The placeholder for the HEX color input."
699
- hexInputPlaceholder="HEX">
666
+ i18n-colorGradientNoColor="kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty."
667
+ colorGradientNoColor="Colorgradient no color chosen"
668
+ i18n-colorGradientHandle="kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser."
669
+ colorGradientHandle="Choose color"
670
+ i18n-clearButton="kendo.colorgradient.clearButton|The title for the clear button."
671
+ clearButton="Clear value"
672
+ i18n-hueSliderHandle="kendo.colorgradient.hueSliderHandle|The title for the hue slider handle."
673
+ hueSliderHandle="Set hue"
674
+ i18n-opacitySliderHandle="kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle."
675
+ opacitySliderHandle="Set opacity"
676
+ i18n-passContrast="kendo.colorgradient.passContrast|The pass message for the contrast tool."
677
+ passContrast="Pass"
678
+ i18n-failContrast="kendo.colorgradient.failContrast|The fail message for the contrast tool."
679
+ failContrast="Fail"
680
+ i18n-contrastRatio="kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool."
681
+ contrastRatio="Contrast ratio"
682
+ i18n-formatButton="kendo.colorgradient.formatButton|The message for the input format toggle button."
683
+ formatButton="Change color format"
684
+ i18n-redChannelLabel="kendo.colorgradient.redChannelLabel|The label of the NumericTextBox representing the red color channel."
685
+ redChannelLabel="Red channel"
686
+ i18n-greenChannelLabel="kendo.colorgradient.greenChannelLabel|The label of the NumericTextBox representing the green color channel."
687
+ greenChannelLabel="Green channel"
688
+ i18n-blueChannelLabel="kendo.colorgradient.blueChannelLabel|The label of the NumericTextBox representing the blue color channel."
689
+ blueChannelLabel="Blue channel"
690
+ i18n-alphaChannelLabel="kendo.colorgradient.alphaChannelLabel|The label of the NumericTextBox representing the alpha color channel."
691
+ alphaChannelLabel="Alpha channel"
692
+ i18n-redInputPlaceholder="kendo.colorgradient.redInputPlaceholder|The placeholder for the red color input."
693
+ redChannelLabel="R"
694
+ i18n-greenInputPlaceholder="kendo.colorgradient.greenInputPlaceholder|The placeholder for the green color input."
695
+ greenInputPlaceholder="G"
696
+ i18n-blueInputPlaceholder="kendo.colorgradient.blueInputPlaceholder|The placeholder for the blue color input."
697
+ blueInputPlaceholder="B"
698
+ i18n-hexInputPlaceholder="kendo.colorgradient.hexInputPlaceholder|The placeholder for the HEX color input."
699
+ hexInputPlaceholder="HEX">
700
700
  </ng-container>
701
701
  <div [ngClass]="{
702
702
  'k-colorgradient-canvas': true,
703
703
  'k-vstack': adaptiveMode,
704
704
  'k-hstack': !adaptiveMode
705
705
  }">
706
- <div class="k-hsv-rectangle" #hsvRectangle>
707
- <div
708
- #gradientWrapper
709
- kendoDraggable
710
- class="k-hsv-gradient"
711
- (click)="changePosition($event)"
712
- (kendoPress)="handleDragPress($event)"
713
- (kendoDrag)="onHandleDrag($event)"
714
- (kendoRelease)="onHandleRelease()"
715
- [style.touch-action]="'none'">
716
- <div
717
- #gradientDragHandle
718
- class="k-hsv-draghandle k-draghandle"
719
- [tabindex]="innerTabIndex.toString()"
720
- [attr.title]="colorGradientHandleTitle"
721
- [attr.aria-label]="colorGradientHandleTitle + ' ' + colorGradientHandleAriaLabel"
722
- role="slider"
723
- [attr.aria-valuetext]="hsvSliderValueText"
724
- [attr.aria-readonly]="readonly ? readonly : undefined"
725
- [attr.aria-disabled]="disabled ? disabled : undefined"
726
- [attr.aria-orientation]="'undefined'"
727
- [attr.aria-valuenow]="'0'"
728
- (keydown.shift.tab)="$event.preventDefault(); inputs.focusLast();">
729
- </div>
730
- </div>
731
- <svg kendoColorContrastSvg
732
- *ngIf="contrastToolVisible && gradientWrapper"
733
- class="k-color-contrast-svg"
734
- xmlns="http://www.w3.org/2000/svg"
735
- [wrapper]="gradientWrapper ? gradientWrapper : undefined"
736
- [hsva]="hsva"
737
- [backgroundColor]="contrastTool"
738
- [style]="'position: absolute; overflow: visible; pointer-events: none; left: 0px; top: 0px;'">
739
- </svg>
706
+ <div class="k-hsv-rectangle" #hsvRectangle>
707
+ <div
708
+ #gradientWrapper
709
+ kendoDraggable
710
+ class="k-hsv-gradient"
711
+ (click)="changePosition($event)"
712
+ (kendoPress)="handleDragPress($event)"
713
+ (kendoDrag)="onHandleDrag($event)"
714
+ (kendoRelease)="onHandleRelease()"
715
+ [style.touch-action]="'none'">
716
+ <div
717
+ #gradientDragHandle
718
+ class="k-hsv-draghandle k-draghandle"
719
+ [tabindex]="innerTabIndex.toString()"
720
+ [attr.title]="colorGradientHandleTitle"
721
+ [attr.aria-label]="colorGradientHandleTitle + ' ' + colorGradientHandleAriaLabel"
722
+ role="slider"
723
+ [attr.aria-valuetext]="hsvSliderValueText"
724
+ [attr.aria-readonly]="readonly ? readonly : undefined"
725
+ [attr.aria-disabled]="disabled ? disabled : undefined"
726
+ [attr.aria-orientation]="'undefined'"
727
+ [attr.aria-valuenow]="'0'"
728
+ (keydown.shift.tab)="$event.preventDefault(); inputs.focusLast();">
729
+ </div>
740
730
  </div>
731
+ @if (contrastToolVisible && gradientWrapper) {
732
+ <svg kendoColorContrastSvg
733
+ class="k-color-contrast-svg"
734
+ xmlns="http://www.w3.org/2000/svg"
735
+ [wrapper]="gradientWrapper ? gradientWrapper : undefined"
736
+ [hsva]="hsva"
737
+ [backgroundColor]="contrastTool"
738
+ [style]="'position: absolute; overflow: visible; pointer-events: none; left: 0px; top: 0px;'">
739
+ </svg>
740
+ }
741
+ </div>
741
742
  <div [ngClass]="{
742
743
  'k-hsv-controls': true,
743
744
  'k-sliders-wrap-clearable': clearButton,
744
745
  'k-vstack': adaptiveMode,
745
746
  'k-hstack': !adaptiveMode
746
747
  }">
747
- <button
748
- kendoButton
749
- *ngIf="clearButton"
750
- class="k-clear-color"
751
- fillMode="flat"
752
- icon="droplet-slash"
753
- [svgIcon]="dropletSlashIcon"
754
- [size]="size"
755
- (click)="reset()"
756
- (keydown.enter)="reset()"
757
- (keydown.space)="reset()"
758
- [attr.aria-label]="clearButtonTitle"
759
- [attr.title]="clearButtonTitle"
760
- [tabindex]="innerTabIndex.toString()"
761
- [style]="'position: absolute; top: 0; left: 50%; transform: translateX(-50%);'"
762
- >
763
- </button>
764
- <kendo-slider
765
- [ngClass]="{'k-align-self-end': clearButton}"
766
- [style.height.px]="clearButton ? '140' : null"
767
- class="k-hue-slider k-colorgradient-slider"
768
- [dragHandleTitle]="hueSliderTitle"
769
- [tabindex]="innerTabIndex"
770
- [disabled]="disabled"
771
- [readonly]="readonly"
772
- [showButtons]="false"
773
- tickPlacement="none"
774
- [vertical]="!adaptiveMode"
775
- [min]="0"
776
- [max]="360"
777
- [value]="hsva.value.h"
778
- [smallStep]="5"
779
- [largeStep]="10"
780
- (valueChange)="handleHueSliderChange($event)"
748
+ @if (clearButton) {
749
+ <button
750
+ kendoButton
751
+ class="k-clear-color"
752
+ fillMode="flat"
753
+ icon="droplet-slash"
754
+ [svgIcon]="dropletSlashIcon"
755
+ [size]="size"
756
+ (click)="reset()"
757
+ (keydown.enter)="reset()"
758
+ (keydown.space)="reset()"
759
+ [attr.aria-label]="clearButtonTitle"
760
+ [attr.title]="clearButtonTitle"
761
+ [tabindex]="innerTabIndex.toString()"
762
+ [style]="'position: absolute; top: 0; left: 50%; transform: translateX(-50%);'"
781
763
  >
782
- </kendo-slider>
783
- <kendo-slider
784
- *ngIf="opacity"
785
- #alphaSlider
786
- [tabindex]="innerTabIndex"
787
- [ngClass]="{'k-align-self-end': clearButton}"
788
- [style.height.px]="clearButton ? '140' : null"
789
- class="k-alpha-slider k-colorgradient-slider"
790
- [dragHandleTitle]="opacitySliderTitle"
791
- [disabled]="disabled"
792
- [readonly]="readonly"
793
- [showButtons]="false"
794
- tickPlacement="none"
795
- [vertical]="!adaptiveMode"
796
- [min]="0"
797
- [max]="100"
798
- [smallStep]="1"
799
- [largeStep]="10"
800
- [value]="alphaSliderValue"
801
- (valueChange)="handleAlphaSliderChange($event)"
764
+ </button>
765
+ }
766
+ <kendo-slider
767
+ [ngClass]="{'k-align-self-end': clearButton}"
768
+ [style.height.px]="clearButton ? '140' : null"
769
+ class="k-hue-slider k-colorgradient-slider"
770
+ [dragHandleTitle]="hueSliderTitle"
771
+ [tabindex]="innerTabIndex"
772
+ [disabled]="disabled"
773
+ [readonly]="readonly"
774
+ [showButtons]="false"
775
+ tickPlacement="none"
776
+ [vertical]="!adaptiveMode"
777
+ [min]="0"
778
+ [max]="360"
779
+ [value]="hsva.value.h"
780
+ [smallStep]="5"
781
+ [largeStep]="10"
782
+ (valueChange)="handleHueSliderChange($event)"
783
+ >
784
+ </kendo-slider>
785
+ @if (opacity) {
786
+ <kendo-slider
787
+ #alphaSlider
788
+ [tabindex]="innerTabIndex"
789
+ [ngClass]="{'k-align-self-end': clearButton}"
790
+ [style.height.px]="clearButton ? '140' : null"
791
+ class="k-alpha-slider k-colorgradient-slider"
792
+ [dragHandleTitle]="opacitySliderTitle"
793
+ [disabled]="disabled"
794
+ [readonly]="readonly"
795
+ [showButtons]="false"
796
+ tickPlacement="none"
797
+ [vertical]="!adaptiveMode"
798
+ [min]="0"
799
+ [max]="100"
800
+ [smallStep]="1"
801
+ [largeStep]="10"
802
+ [value]="alphaSliderValue"
803
+ (valueChange)="handleAlphaSliderChange($event)"
802
804
  >
803
- </kendo-slider>
804
- </div>
805
+ </kendo-slider>
806
+ }
807
+ </div>
805
808
  </div>
806
809
  <kendo-colorinput #inputs
807
- [tabindex]="innerTabIndex"
808
- [opacity]="opacity"
809
- [size]="size"
810
- [formatView]="format"
811
- [value]="value"
812
- [disabled]="disabled"
813
- [readonly]="readonly"
814
- (valueChange)="handleInputsValueChange($event)"
815
- (tabOut)="gradientDragHandle.focus()"
816
- >
810
+ [tabindex]="innerTabIndex"
811
+ [opacity]="opacity"
812
+ [size]="size"
813
+ [formatView]="format"
814
+ [value]="value"
815
+ [disabled]="disabled"
816
+ [readonly]="readonly"
817
+ (valueChange)="handleInputsValueChange($event)"
818
+ (tabOut)="gradientDragHandle.focus()"
819
+ >
817
820
  </kendo-colorinput>
818
- <div class="k-colorgradient-color-contrast k-vbox"
819
- *ngIf="contrastToolVisible"
821
+ @if (contrastToolVisible) {
822
+ <div class="k-colorgradient-color-contrast k-vbox"
820
823
  kendoContrastTool
821
824
  [value]="value"
822
825
  [ratio]="contrastTool">
823
- </div>
824
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedColorPickerMessagesDirective, selector: "[kendoColorPickerLocalizedMessages], [kendoFlatColorPickerLocalizedMessages], [kendoColorGradientLocalizedMessages], [kendoColorPaletteLocalizedMessages]" }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ColorContrastSvgComponent, selector: "[kendoColorContrastSvg]", inputs: ["wrapper", "hsva", "backgroundColor"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: SliderComponent, selector: "kendo-slider", inputs: ["focusableId", "dragHandleTitle", "incrementTitle", "animate", "decrementTitle", "showButtons", "value", "tabIndex"], exportAs: ["kendoSlider"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ColorInputComponent, selector: "kendo-colorinput", inputs: ["focusableId", "formatView", "size", "tabindex", "value", "opacity", "disabled", "readonly"], outputs: ["valueChange", "tabOut"] }, { kind: "component", type: ContrastComponent, selector: "[kendoContrastTool]", inputs: ["value", "ratio"] }] });
826
+ </div>
827
+ }
828
+ `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedColorPickerMessagesDirective, selector: "[kendoColorPickerLocalizedMessages], [kendoFlatColorPickerLocalizedMessages], [kendoColorGradientLocalizedMessages], [kendoColorPaletteLocalizedMessages]" }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "component", type: ColorContrastSvgComponent, selector: "[kendoColorContrastSvg]", inputs: ["wrapper", "hsva", "backgroundColor"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: SliderComponent, selector: "kendo-slider", inputs: ["focusableId", "dragHandleTitle", "incrementTitle", "animate", "decrementTitle", "showButtons", "value", "tabIndex"], exportAs: ["kendoSlider"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ColorInputComponent, selector: "kendo-colorinput", inputs: ["focusableId", "formatView", "size", "tabindex", "value", "opacity", "disabled", "readonly"], outputs: ["valueChange", "tabOut"] }, { kind: "component", type: ContrastComponent, selector: "[kendoContrastTool]", inputs: ["value", "ratio"] }] });
825
829
  }
826
830
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorGradientComponent, decorators: [{
827
831
  type: Component,
@@ -850,167 +854,171 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
850
854
  ],
851
855
  template: `
852
856
  <ng-container kendoColorGradientLocalizedMessages
853
- i18n-colorGradientNoColor="kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty."
854
- colorGradientNoColor="Colorgradient no color chosen"
855
- i18n-colorGradientHandle="kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser."
856
- colorGradientHandle="Choose color"
857
- i18n-clearButton="kendo.colorgradient.clearButton|The title for the clear button."
858
- clearButton="Clear value"
859
- i18n-hueSliderHandle="kendo.colorgradient.hueSliderHandle|The title for the hue slider handle."
860
- hueSliderHandle="Set hue"
861
- i18n-opacitySliderHandle="kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle."
862
- opacitySliderHandle="Set opacity"
863
- i18n-passContrast="kendo.colorgradient.passContrast|The pass message for the contrast tool."
864
- passContrast="Pass"
865
- i18n-failContrast="kendo.colorgradient.failContrast|The fail message for the contrast tool."
866
- failContrast="Fail"
867
- i18n-contrastRatio="kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool."
868
- contrastRatio="Contrast ratio"
869
- i18n-formatButton="kendo.colorgradient.formatButton|The message for the input format toggle button."
870
- formatButton="Change color format"
871
- i18n-redChannelLabel="kendo.colorgradient.redChannelLabel|The label of the NumericTextBox representing the red color channel."
872
- redChannelLabel="Red channel"
873
- i18n-greenChannelLabel="kendo.colorgradient.greenChannelLabel|The label of the NumericTextBox representing the green color channel."
874
- greenChannelLabel="Green channel"
875
- i18n-blueChannelLabel="kendo.colorgradient.blueChannelLabel|The label of the NumericTextBox representing the blue color channel."
876
- blueChannelLabel="Blue channel"
877
- i18n-alphaChannelLabel="kendo.colorgradient.alphaChannelLabel|The label of the NumericTextBox representing the alpha color channel."
878
- alphaChannelLabel="Alpha channel"
879
- i18n-redInputPlaceholder="kendo.colorgradient.redInputPlaceholder|The placeholder for the red color input."
880
- redChannelLabel="R"
881
- i18n-greenInputPlaceholder="kendo.colorgradient.greenInputPlaceholder|The placeholder for the green color input."
882
- greenInputPlaceholder="G"
883
- i18n-blueInputPlaceholder="kendo.colorgradient.blueInputPlaceholder|The placeholder for the blue color input."
884
- blueInputPlaceholder="B"
885
- i18n-hexInputPlaceholder="kendo.colorgradient.hexInputPlaceholder|The placeholder for the HEX color input."
886
- hexInputPlaceholder="HEX">
857
+ i18n-colorGradientNoColor="kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty."
858
+ colorGradientNoColor="Colorgradient no color chosen"
859
+ i18n-colorGradientHandle="kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser."
860
+ colorGradientHandle="Choose color"
861
+ i18n-clearButton="kendo.colorgradient.clearButton|The title for the clear button."
862
+ clearButton="Clear value"
863
+ i18n-hueSliderHandle="kendo.colorgradient.hueSliderHandle|The title for the hue slider handle."
864
+ hueSliderHandle="Set hue"
865
+ i18n-opacitySliderHandle="kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle."
866
+ opacitySliderHandle="Set opacity"
867
+ i18n-passContrast="kendo.colorgradient.passContrast|The pass message for the contrast tool."
868
+ passContrast="Pass"
869
+ i18n-failContrast="kendo.colorgradient.failContrast|The fail message for the contrast tool."
870
+ failContrast="Fail"
871
+ i18n-contrastRatio="kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool."
872
+ contrastRatio="Contrast ratio"
873
+ i18n-formatButton="kendo.colorgradient.formatButton|The message for the input format toggle button."
874
+ formatButton="Change color format"
875
+ i18n-redChannelLabel="kendo.colorgradient.redChannelLabel|The label of the NumericTextBox representing the red color channel."
876
+ redChannelLabel="Red channel"
877
+ i18n-greenChannelLabel="kendo.colorgradient.greenChannelLabel|The label of the NumericTextBox representing the green color channel."
878
+ greenChannelLabel="Green channel"
879
+ i18n-blueChannelLabel="kendo.colorgradient.blueChannelLabel|The label of the NumericTextBox representing the blue color channel."
880
+ blueChannelLabel="Blue channel"
881
+ i18n-alphaChannelLabel="kendo.colorgradient.alphaChannelLabel|The label of the NumericTextBox representing the alpha color channel."
882
+ alphaChannelLabel="Alpha channel"
883
+ i18n-redInputPlaceholder="kendo.colorgradient.redInputPlaceholder|The placeholder for the red color input."
884
+ redChannelLabel="R"
885
+ i18n-greenInputPlaceholder="kendo.colorgradient.greenInputPlaceholder|The placeholder for the green color input."
886
+ greenInputPlaceholder="G"
887
+ i18n-blueInputPlaceholder="kendo.colorgradient.blueInputPlaceholder|The placeholder for the blue color input."
888
+ blueInputPlaceholder="B"
889
+ i18n-hexInputPlaceholder="kendo.colorgradient.hexInputPlaceholder|The placeholder for the HEX color input."
890
+ hexInputPlaceholder="HEX">
887
891
  </ng-container>
888
892
  <div [ngClass]="{
889
893
  'k-colorgradient-canvas': true,
890
894
  'k-vstack': adaptiveMode,
891
895
  'k-hstack': !adaptiveMode
892
896
  }">
893
- <div class="k-hsv-rectangle" #hsvRectangle>
894
- <div
895
- #gradientWrapper
896
- kendoDraggable
897
- class="k-hsv-gradient"
898
- (click)="changePosition($event)"
899
- (kendoPress)="handleDragPress($event)"
900
- (kendoDrag)="onHandleDrag($event)"
901
- (kendoRelease)="onHandleRelease()"
902
- [style.touch-action]="'none'">
903
- <div
904
- #gradientDragHandle
905
- class="k-hsv-draghandle k-draghandle"
906
- [tabindex]="innerTabIndex.toString()"
907
- [attr.title]="colorGradientHandleTitle"
908
- [attr.aria-label]="colorGradientHandleTitle + ' ' + colorGradientHandleAriaLabel"
909
- role="slider"
910
- [attr.aria-valuetext]="hsvSliderValueText"
911
- [attr.aria-readonly]="readonly ? readonly : undefined"
912
- [attr.aria-disabled]="disabled ? disabled : undefined"
913
- [attr.aria-orientation]="'undefined'"
914
- [attr.aria-valuenow]="'0'"
915
- (keydown.shift.tab)="$event.preventDefault(); inputs.focusLast();">
916
- </div>
917
- </div>
918
- <svg kendoColorContrastSvg
919
- *ngIf="contrastToolVisible && gradientWrapper"
920
- class="k-color-contrast-svg"
921
- xmlns="http://www.w3.org/2000/svg"
922
- [wrapper]="gradientWrapper ? gradientWrapper : undefined"
923
- [hsva]="hsva"
924
- [backgroundColor]="contrastTool"
925
- [style]="'position: absolute; overflow: visible; pointer-events: none; left: 0px; top: 0px;'">
926
- </svg>
897
+ <div class="k-hsv-rectangle" #hsvRectangle>
898
+ <div
899
+ #gradientWrapper
900
+ kendoDraggable
901
+ class="k-hsv-gradient"
902
+ (click)="changePosition($event)"
903
+ (kendoPress)="handleDragPress($event)"
904
+ (kendoDrag)="onHandleDrag($event)"
905
+ (kendoRelease)="onHandleRelease()"
906
+ [style.touch-action]="'none'">
907
+ <div
908
+ #gradientDragHandle
909
+ class="k-hsv-draghandle k-draghandle"
910
+ [tabindex]="innerTabIndex.toString()"
911
+ [attr.title]="colorGradientHandleTitle"
912
+ [attr.aria-label]="colorGradientHandleTitle + ' ' + colorGradientHandleAriaLabel"
913
+ role="slider"
914
+ [attr.aria-valuetext]="hsvSliderValueText"
915
+ [attr.aria-readonly]="readonly ? readonly : undefined"
916
+ [attr.aria-disabled]="disabled ? disabled : undefined"
917
+ [attr.aria-orientation]="'undefined'"
918
+ [attr.aria-valuenow]="'0'"
919
+ (keydown.shift.tab)="$event.preventDefault(); inputs.focusLast();">
920
+ </div>
927
921
  </div>
922
+ @if (contrastToolVisible && gradientWrapper) {
923
+ <svg kendoColorContrastSvg
924
+ class="k-color-contrast-svg"
925
+ xmlns="http://www.w3.org/2000/svg"
926
+ [wrapper]="gradientWrapper ? gradientWrapper : undefined"
927
+ [hsva]="hsva"
928
+ [backgroundColor]="contrastTool"
929
+ [style]="'position: absolute; overflow: visible; pointer-events: none; left: 0px; top: 0px;'">
930
+ </svg>
931
+ }
932
+ </div>
928
933
  <div [ngClass]="{
929
934
  'k-hsv-controls': true,
930
935
  'k-sliders-wrap-clearable': clearButton,
931
936
  'k-vstack': adaptiveMode,
932
937
  'k-hstack': !adaptiveMode
933
938
  }">
934
- <button
935
- kendoButton
936
- *ngIf="clearButton"
937
- class="k-clear-color"
938
- fillMode="flat"
939
- icon="droplet-slash"
940
- [svgIcon]="dropletSlashIcon"
941
- [size]="size"
942
- (click)="reset()"
943
- (keydown.enter)="reset()"
944
- (keydown.space)="reset()"
945
- [attr.aria-label]="clearButtonTitle"
946
- [attr.title]="clearButtonTitle"
947
- [tabindex]="innerTabIndex.toString()"
948
- [style]="'position: absolute; top: 0; left: 50%; transform: translateX(-50%);'"
949
- >
950
- </button>
951
- <kendo-slider
952
- [ngClass]="{'k-align-self-end': clearButton}"
953
- [style.height.px]="clearButton ? '140' : null"
954
- class="k-hue-slider k-colorgradient-slider"
955
- [dragHandleTitle]="hueSliderTitle"
956
- [tabindex]="innerTabIndex"
957
- [disabled]="disabled"
958
- [readonly]="readonly"
959
- [showButtons]="false"
960
- tickPlacement="none"
961
- [vertical]="!adaptiveMode"
962
- [min]="0"
963
- [max]="360"
964
- [value]="hsva.value.h"
965
- [smallStep]="5"
966
- [largeStep]="10"
967
- (valueChange)="handleHueSliderChange($event)"
939
+ @if (clearButton) {
940
+ <button
941
+ kendoButton
942
+ class="k-clear-color"
943
+ fillMode="flat"
944
+ icon="droplet-slash"
945
+ [svgIcon]="dropletSlashIcon"
946
+ [size]="size"
947
+ (click)="reset()"
948
+ (keydown.enter)="reset()"
949
+ (keydown.space)="reset()"
950
+ [attr.aria-label]="clearButtonTitle"
951
+ [attr.title]="clearButtonTitle"
952
+ [tabindex]="innerTabIndex.toString()"
953
+ [style]="'position: absolute; top: 0; left: 50%; transform: translateX(-50%);'"
968
954
  >
969
- </kendo-slider>
970
- <kendo-slider
971
- *ngIf="opacity"
972
- #alphaSlider
973
- [tabindex]="innerTabIndex"
974
- [ngClass]="{'k-align-self-end': clearButton}"
975
- [style.height.px]="clearButton ? '140' : null"
976
- class="k-alpha-slider k-colorgradient-slider"
977
- [dragHandleTitle]="opacitySliderTitle"
978
- [disabled]="disabled"
979
- [readonly]="readonly"
980
- [showButtons]="false"
981
- tickPlacement="none"
982
- [vertical]="!adaptiveMode"
983
- [min]="0"
984
- [max]="100"
985
- [smallStep]="1"
986
- [largeStep]="10"
987
- [value]="alphaSliderValue"
988
- (valueChange)="handleAlphaSliderChange($event)"
955
+ </button>
956
+ }
957
+ <kendo-slider
958
+ [ngClass]="{'k-align-self-end': clearButton}"
959
+ [style.height.px]="clearButton ? '140' : null"
960
+ class="k-hue-slider k-colorgradient-slider"
961
+ [dragHandleTitle]="hueSliderTitle"
962
+ [tabindex]="innerTabIndex"
963
+ [disabled]="disabled"
964
+ [readonly]="readonly"
965
+ [showButtons]="false"
966
+ tickPlacement="none"
967
+ [vertical]="!adaptiveMode"
968
+ [min]="0"
969
+ [max]="360"
970
+ [value]="hsva.value.h"
971
+ [smallStep]="5"
972
+ [largeStep]="10"
973
+ (valueChange)="handleHueSliderChange($event)"
974
+ >
975
+ </kendo-slider>
976
+ @if (opacity) {
977
+ <kendo-slider
978
+ #alphaSlider
979
+ [tabindex]="innerTabIndex"
980
+ [ngClass]="{'k-align-self-end': clearButton}"
981
+ [style.height.px]="clearButton ? '140' : null"
982
+ class="k-alpha-slider k-colorgradient-slider"
983
+ [dragHandleTitle]="opacitySliderTitle"
984
+ [disabled]="disabled"
985
+ [readonly]="readonly"
986
+ [showButtons]="false"
987
+ tickPlacement="none"
988
+ [vertical]="!adaptiveMode"
989
+ [min]="0"
990
+ [max]="100"
991
+ [smallStep]="1"
992
+ [largeStep]="10"
993
+ [value]="alphaSliderValue"
994
+ (valueChange)="handleAlphaSliderChange($event)"
989
995
  >
990
- </kendo-slider>
991
- </div>
996
+ </kendo-slider>
997
+ }
998
+ </div>
992
999
  </div>
993
1000
  <kendo-colorinput #inputs
994
- [tabindex]="innerTabIndex"
995
- [opacity]="opacity"
996
- [size]="size"
997
- [formatView]="format"
998
- [value]="value"
999
- [disabled]="disabled"
1000
- [readonly]="readonly"
1001
- (valueChange)="handleInputsValueChange($event)"
1002
- (tabOut)="gradientDragHandle.focus()"
1003
- >
1001
+ [tabindex]="innerTabIndex"
1002
+ [opacity]="opacity"
1003
+ [size]="size"
1004
+ [formatView]="format"
1005
+ [value]="value"
1006
+ [disabled]="disabled"
1007
+ [readonly]="readonly"
1008
+ (valueChange)="handleInputsValueChange($event)"
1009
+ (tabOut)="gradientDragHandle.focus()"
1010
+ >
1004
1011
  </kendo-colorinput>
1005
- <div class="k-colorgradient-color-contrast k-vbox"
1006
- *ngIf="contrastToolVisible"
1012
+ @if (contrastToolVisible) {
1013
+ <div class="k-colorgradient-color-contrast k-vbox"
1007
1014
  kendoContrastTool
1008
1015
  [value]="value"
1009
1016
  [ratio]="contrastTool">
1010
- </div>
1011
- `,
1017
+ </div>
1018
+ }
1019
+ `,
1012
1020
  standalone: true,
1013
- imports: [LocalizedColorPickerMessagesDirective, DraggableDirective, NgIf, ColorContrastSvgComponent, ButtonComponent, SliderComponent, NgClass, ColorInputComponent, ContrastComponent]
1021
+ imports: [LocalizedColorPickerMessagesDirective, DraggableDirective, ColorContrastSvgComponent, ButtonComponent, SliderComponent, NgClass, ColorInputComponent, ContrastComponent]
1014
1022
  }]
1015
1023
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i0.Injector }], propDecorators: { hostClasses: [{
1016
1024
  type: HostBinding,