@progress/kendo-angular-inputs 8.0.0-dev.202112161434 → 8.0.0-dev.202112211528
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.
- package/dist/cdn/js/kendo-angular-inputs.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/checkbox/checkbox.directive.js +79 -3
- package/dist/es/colorpicker/color-gradient.component.js +1 -1
- package/dist/es/colorpicker/color-input.component.js +1 -1
- package/dist/es/colorpicker/colorpicker.component.js +111 -6
- package/dist/es/colorpicker/flatcolorpicker-actions.component.js +1 -1
- package/dist/es/colorpicker/flatcolorpicker-header.component.js +1 -1
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/common/models/styling-classes.js +4 -0
- package/dist/es/common/models.js +4 -0
- package/dist/es/common/utils.js +37 -0
- package/dist/es/main.js +0 -1
- package/dist/es/maskedtextbox/maskedtextbox.component.js +101 -6
- package/dist/es/numerictextbox/numerictextbox.component.js +116 -20
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/radiobutton.directive.js +52 -3
- package/dist/es/shared/textarea.directive.js +3 -2
- package/dist/es/switch/switch.component.js +167 -21
- package/dist/es/text-fields-common/text-fields-base.js +1 -1
- package/dist/es/textarea/textarea.component.js +101 -5
- package/dist/es/textbox/textbox.component.js +108 -11
- package/dist/es/textbox/textbox.directive.js +3 -2
- package/dist/es/textbox.module.js +0 -3
- package/dist/es2015/checkbox/checkbox.directive.d.ts +31 -0
- package/dist/es2015/checkbox/checkbox.directive.js +68 -10
- package/dist/es2015/colorpicker/color-gradient.component.js +1 -1
- package/dist/es2015/colorpicker/color-input.component.js +1 -1
- package/dist/es2015/colorpicker/colorpicker.component.d.ts +45 -3
- package/dist/es2015/colorpicker/colorpicker.component.js +113 -16
- package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +2 -2
- package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +2 -2
- package/dist/es2015/common/models/fillmode.d.ts +13 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +23 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/common/models/styling-classes.d.ts +11 -0
- package/dist/es2015/common/models/styling-classes.js +4 -0
- package/dist/es2015/common/models.d.ts +8 -0
- package/dist/es2015/common/models.js +4 -0
- package/dist/es2015/common/utils.d.ts +7 -0
- package/dist/es2015/common/utils.js +37 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/main.d.ts +1 -1
- package/dist/es2015/main.js +0 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.d.ts +39 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.js +88 -6
- package/dist/es2015/numerictextbox/numerictextbox.component.d.ts +39 -2
- package/dist/es2015/numerictextbox/numerictextbox.component.js +124 -40
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/radiobutton/radiobutton.directive.d.ts +18 -0
- package/dist/es2015/radiobutton/radiobutton.directive.js +46 -11
- package/dist/es2015/shared/textarea.directive.d.ts +1 -1
- package/dist/es2015/shared/textarea.directive.js +3 -2
- package/dist/es2015/switch/switch.component.d.ts +48 -5
- package/dist/es2015/switch/switch.component.js +166 -24
- package/dist/es2015/text-fields-common/text-fields-base.js +1 -1
- package/dist/es2015/textarea/textarea.component.d.ts +39 -1
- package/dist/es2015/textarea/textarea.component.js +89 -5
- package/dist/es2015/textbox/textbox.component.d.ts +40 -1
- package/dist/es2015/textbox/textbox.component.js +96 -11
- package/dist/es2015/textbox/textbox.directive.d.ts +1 -1
- package/dist/es2015/textbox/textbox.directive.js +3 -2
- package/dist/es2015/textbox.module.js +0 -3
- package/dist/fesm2015/index.js +936 -478
- package/dist/fesm5/index.js +1015 -484
- package/dist/npm/checkbox/checkbox.directive.js +78 -2
- package/dist/npm/colorpicker/color-gradient.component.js +1 -1
- package/dist/npm/colorpicker/color-input.component.js +1 -1
- package/dist/npm/colorpicker/colorpicker.component.js +109 -4
- package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +1 -1
- package/dist/npm/colorpicker/flatcolorpicker-header.component.js +1 -1
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/models/styling-classes.js +6 -0
- package/dist/npm/common/models.js +6 -0
- package/dist/npm/common/utils.js +37 -0
- package/dist/npm/main.js +0 -2
- package/dist/npm/maskedtextbox/maskedtextbox.component.js +100 -5
- package/dist/npm/numerictextbox/numerictextbox.component.js +115 -19
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/radiobutton.directive.js +51 -2
- package/dist/npm/shared/textarea.directive.js +3 -2
- package/dist/npm/switch/switch.component.js +166 -20
- package/dist/npm/text-fields-common/text-fields-base.js +1 -1
- package/dist/npm/textarea/textarea.component.js +100 -4
- package/dist/npm/textbox/textbox.component.js +107 -10
- package/dist/npm/textbox/textbox.directive.js +3 -2
- package/dist/npm/textbox.module.js +0 -3
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +11 -11
- package/dist/es/textbox/floating-label-input-adapter.js +0 -58
- package/dist/es/textbox/textbox-container.component.js +0 -224
- package/dist/es2015/textbox/floating-label-input-adapter.d.ts +0 -20
- package/dist/es2015/textbox/floating-label-input-adapter.js +0 -52
- package/dist/es2015/textbox/textbox-container.component.d.ts +0 -59
- package/dist/es2015/textbox/textbox-container.component.js +0 -209
- package/dist/npm/textbox/floating-label-input-adapter.js +0 -60
- package/dist/npm/textbox/textbox-container.component.js +0 -226
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
|
+
var utils_1 = require("../common/utils");
|
|
9
10
|
/**
|
|
10
11
|
* Represents the directive that renders the [Kendo UI CheckBox]({% slug overview_checkbox %}) input component.
|
|
11
12
|
* The directive is placed on input type="checkbox" elements.
|
|
@@ -16,17 +17,92 @@ var core_1 = require("@angular/core");
|
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
18
19
|
var CheckBoxDirective = /** @class */ (function () {
|
|
19
|
-
function CheckBoxDirective() {
|
|
20
|
+
function CheckBoxDirective(renderer, hostElement) {
|
|
21
|
+
this.renderer = renderer;
|
|
22
|
+
this.hostElement = hostElement;
|
|
20
23
|
this.kendoClass = true;
|
|
24
|
+
this._size = 'medium';
|
|
25
|
+
this._rounded = 'medium';
|
|
21
26
|
}
|
|
27
|
+
Object.defineProperty(CheckBoxDirective.prototype, "size", {
|
|
28
|
+
get: function () {
|
|
29
|
+
return this._size;
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* The size property specifies the width and height of the CheckBox
|
|
33
|
+
* ([see example]({% slug appearance_checkboxdirective %}#toc-size)).
|
|
34
|
+
*
|
|
35
|
+
* The possible values are:
|
|
36
|
+
* * `'small'`
|
|
37
|
+
* * `'medium'` (default)
|
|
38
|
+
* * `'large'`
|
|
39
|
+
* * `null`
|
|
40
|
+
*/
|
|
41
|
+
set: function (size) {
|
|
42
|
+
this.handleClasses(size, 'size');
|
|
43
|
+
this._size = size;
|
|
44
|
+
},
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(CheckBoxDirective.prototype, "rounded", {
|
|
49
|
+
get: function () {
|
|
50
|
+
return this._rounded;
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* The rounded property specifies the border radius of the CheckBox
|
|
54
|
+
* ([see example]({% slug appearance_checkboxdirective %}#toc-rounded)).
|
|
55
|
+
*
|
|
56
|
+
* The possible values are:
|
|
57
|
+
* * `'small'`
|
|
58
|
+
* * `'medium'` (default)
|
|
59
|
+
* * `'large'`
|
|
60
|
+
* * `null`
|
|
61
|
+
*/
|
|
62
|
+
set: function (rounded) {
|
|
63
|
+
this.handleClasses(rounded, 'rounded');
|
|
64
|
+
this._rounded = rounded;
|
|
65
|
+
},
|
|
66
|
+
enumerable: true,
|
|
67
|
+
configurable: true
|
|
68
|
+
});
|
|
69
|
+
CheckBoxDirective.prototype.ngAfterViewInit = function () {
|
|
70
|
+
var _this = this;
|
|
71
|
+
var stylingInputs = ['size', 'rounded'];
|
|
72
|
+
stylingInputs.forEach(function (input) {
|
|
73
|
+
_this.handleClasses(_this[input], input);
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
CheckBoxDirective.prototype.handleClasses = function (value, input) {
|
|
77
|
+
var elem = this.hostElement.nativeElement;
|
|
78
|
+
var classes = utils_1.getStylingClasses('checkbox', input, this[input], value);
|
|
79
|
+
if (classes.toRemove) {
|
|
80
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
81
|
+
}
|
|
82
|
+
if (classes.toAdd) {
|
|
83
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
22
86
|
tslib_1.__decorate([
|
|
23
87
|
core_1.HostBinding('class.k-checkbox'),
|
|
24
88
|
tslib_1.__metadata("design:type", Boolean)
|
|
25
89
|
], CheckBoxDirective.prototype, "kendoClass", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
core_1.Input(),
|
|
92
|
+
tslib_1.__metadata("design:type", String),
|
|
93
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
94
|
+
], CheckBoxDirective.prototype, "size", null);
|
|
95
|
+
tslib_1.__decorate([
|
|
96
|
+
core_1.Input(),
|
|
97
|
+
tslib_1.__metadata("design:type", String),
|
|
98
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
99
|
+
], CheckBoxDirective.prototype, "rounded", null);
|
|
26
100
|
CheckBoxDirective = tslib_1.__decorate([
|
|
27
101
|
core_1.Directive({
|
|
28
102
|
selector: 'input[kendoCheckBox]'
|
|
29
|
-
})
|
|
103
|
+
}),
|
|
104
|
+
tslib_1.__metadata("design:paramtypes", [core_1.Renderer2,
|
|
105
|
+
core_1.ElementRef])
|
|
30
106
|
], CheckBoxDirective);
|
|
31
107
|
return CheckBoxDirective;
|
|
32
108
|
}());
|
|
@@ -664,7 +664,7 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
664
664
|
useValue: 'kendo.colorgradient'
|
|
665
665
|
}
|
|
666
666
|
],
|
|
667
|
-
template: "\n <ng-container kendoColorGradientLocalizedMessages\n i18n-colorGradientNoColor=\"kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorgradient.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorgradient.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-passContrast=\"kendo.colorgradient.passContrast|The pass message for the contrast tool.\"\n passContrast=\"Pass\"\n i18n-failContrast=\"kendo.colorgradient.failContrast|The fail message for the contrast tool.\"\n failContrast=\"Fail\"\n i18n-contrastRatio=\"kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-formatButton=\"kendo.colorgradient.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\">\n </ng-container>\n <div class=\"k-colorgradient-canvas k-hstack\">\n <div class=\"k-hsv-rectangle\" [style.background]=\"backgroundColor\">\n <div\n #gradientWrapper\n kendoDraggable\n class=\"k-hsv-gradient\"\n (click)=\"changePosition($event)\"\n (kendoPress)=\"handleDragPress($event)\"\n (kendoDrag)=\"onHandleDrag($event)\"\n (kendoRelease)=\"onHandleRelease()\">\n <div\n #gradientDragHandle\n class=\"k-hsv-draghandle k-draghandle\"\n tabindex=\"0\"\n [attr.title]=\"colorGradientHandleTitle\"\n [attr.aria-label]=\"colorGradientHandleAriaLabel\"\n >\n </div>\n </div>\n <svg kendoColorContrastSvg\n *ngIf=\"contrastToolVisible && gradientWrapper\"\n class=\"k-color-contrast-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [wrapper]=\"gradientWrapper ? gradientWrapper : undefined\"\n [hsva]=\"hsva\"\n [backgroundColor]=\"contrastTool\">\n </svg>\n </div>\n <div class=\"k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}\">\n <span class=\"k-clear-color k-button k-flat k-button-icon\"\n *ngIf=\"clearButton\"\n (click)=\"reset()\"\n (keydown.enter)=\"reset()\"\n (keydown.space)=\"reset()\"\n [attr.aria-label]=\"clearButtonTitle\"\n [attr.title]=\"clearButtonTitle\"\n tabindex=\"0\">\n <span class=\"k-icon k-i-reset-color\"></span>\n </span>\n <kendo-slider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-hue-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"hueSliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"360\"\n [smallStep]=\"5\"\n [largeStep]=\"10\"\n [value]=\"hsva.value.h\"\n (valueChange)=\"handleHueSliderChange($event)\"\n >\n </kendo-slider>\n <kendo-slider\n *ngIf=\"opacity\"\n #alphaSlider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-alpha-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"opacitySliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"100\"\n [smallStep]=\"1\"\n [largeStep]=\"10\"\n [value]=\"alphaSliderValue\"\n (valueChange)=\"handleAlphaSliderChange($event)\"\n >\n </kendo-slider>\n </div>\n </div>\n <kendo-colorinput #inputs\n [opacity]=\"opacity\"\n [formatView]=\"format\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleInputsValueChange($event)\"\n >\n </kendo-colorinput>\n <div class=\"k-colorgradient-color-contrast k-vbox\" *ngIf=\"contrastToolVisible\"\n kendoContrastTool\n [value]=\"value\"\n [ratio]=\"contrastTool\">\n </div>\n ",
|
|
667
|
+
template: "\n <ng-container kendoColorGradientLocalizedMessages\n i18n-colorGradientNoColor=\"kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorgradient.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorgradient.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-passContrast=\"kendo.colorgradient.passContrast|The pass message for the contrast tool.\"\n passContrast=\"Pass\"\n i18n-failContrast=\"kendo.colorgradient.failContrast|The fail message for the contrast tool.\"\n failContrast=\"Fail\"\n i18n-contrastRatio=\"kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-formatButton=\"kendo.colorgradient.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\">\n </ng-container>\n <div class=\"k-colorgradient-canvas k-hstack\">\n <div class=\"k-hsv-rectangle\" [style.background]=\"backgroundColor\">\n <div\n #gradientWrapper\n kendoDraggable\n class=\"k-hsv-gradient\"\n (click)=\"changePosition($event)\"\n (kendoPress)=\"handleDragPress($event)\"\n (kendoDrag)=\"onHandleDrag($event)\"\n (kendoRelease)=\"onHandleRelease()\">\n <div\n #gradientDragHandle\n class=\"k-hsv-draghandle k-draghandle\"\n tabindex=\"0\"\n [attr.title]=\"colorGradientHandleTitle\"\n [attr.aria-label]=\"colorGradientHandleAriaLabel\"\n >\n </div>\n </div>\n <svg kendoColorContrastSvg\n *ngIf=\"contrastToolVisible && gradientWrapper\"\n class=\"k-color-contrast-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [wrapper]=\"gradientWrapper ? gradientWrapper : undefined\"\n [hsva]=\"hsva\"\n [backgroundColor]=\"contrastTool\">\n </svg>\n </div>\n <div class=\"k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}\">\n <span class=\"k-clear-color k-button k-button-md k-button-flat k-button-flat-base k-button-icon\"\n *ngIf=\"clearButton\"\n (click)=\"reset()\"\n (keydown.enter)=\"reset()\"\n (keydown.space)=\"reset()\"\n [attr.aria-label]=\"clearButtonTitle\"\n [attr.title]=\"clearButtonTitle\"\n tabindex=\"0\">\n <span class=\"k-icon k-i-reset-color\"></span>\n </span>\n <kendo-slider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-hue-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"hueSliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"360\"\n [smallStep]=\"5\"\n [largeStep]=\"10\"\n [value]=\"hsva.value.h\"\n (valueChange)=\"handleHueSliderChange($event)\"\n >\n </kendo-slider>\n <kendo-slider\n *ngIf=\"opacity\"\n #alphaSlider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-alpha-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"opacitySliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"100\"\n [smallStep]=\"1\"\n [largeStep]=\"10\"\n [value]=\"alphaSliderValue\"\n (valueChange)=\"handleAlphaSliderChange($event)\"\n >\n </kendo-slider>\n </div>\n </div>\n <kendo-colorinput #inputs\n [opacity]=\"opacity\"\n [formatView]=\"format\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleInputsValueChange($event)\"\n >\n </kendo-colorinput>\n <div class=\"k-colorgradient-color-contrast k-vbox\" *ngIf=\"contrastToolVisible\"\n kendoContrastTool\n [value]=\"value\"\n [ratio]=\"contrastTool\">\n </div>\n ",
|
|
668
668
|
styles: ["\n .k-clear-color {\n position: absolute;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n }\n .k-colorgradient-slider.k-align-self-end {\n height: 140px;\n }\n\n .k-color-contrast-svg {\n position: absolute;\n overflow: visible;\n pointer-events: none;\n left: 0px;\n top: 0px;\n }\n "]
|
|
669
669
|
}),
|
|
670
670
|
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
@@ -184,7 +184,7 @@ var ColorInputComponent = /** @class */ (function () {
|
|
|
184
184
|
ColorInputComponent = tslib_1.__decorate([
|
|
185
185
|
core_1.Component({
|
|
186
186
|
selector: 'kendo-colorinput',
|
|
187
|
-
template: "\n <div class=\"k-vstack\">\n <button #toggleFormatButton\n class=\"k-colorgradient-toggle-mode k-button k-
|
|
187
|
+
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-textbox k-hex-value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [value]=\"hex || ''\"\n (blur)=\"handleHexInputBlur()\"\n (input)=\"handleHexValueChange(hexInput.value)\"\n />\n <label [for]=\"focusableId\" class=\"k-colorgradient-input-label\">HEX</label>\n </div>\n <ng-container *ngIf=\"formatView === 'rgba'\">\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #red\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.r\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"red.focusableId\" class=\"k-colorgradient-input-label\">R</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #green\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.g\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"green.focusableId\" class=\"k-colorgradient-input-label\">G</label>\n </div>\n <div class=\"k-vstack\">\n <kendo-numerictextbox\n #blue\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"255\"\n [(value)]=\"rgba.b\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [format]=\"'n'\"\n [decimals]=\"0\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"blue.focusableId\" class=\"k-colorgradient-input-label\">B</label>\n </div>\n <div class=\"k-vstack\" *ngIf=\"opacity\">\n <kendo-numerictextbox #opacityInput\n #alpha\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [min]=\"0\"\n [max]=\"1\"\n [(value)]=\"rgba.a\"\n [autoCorrect]=\"true\"\n [spinners]=\"false\"\n [step]=\"0.01\"\n [format]=\"'n2'\"\n [decimals]=\"2\"\n (blur)=\"handleRgbaInputBlur()\"\n (valueChange)=\"handleRgbaValueChange()\">\n </kendo-numerictextbox>\n <label [for]=\"alpha.focusableId\" class=\"k-colorgradient-input-label\">A</label>\n </div>\n </ng-container>\n "
|
|
188
188
|
}),
|
|
189
189
|
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
190
190
|
core_1.Renderer2,
|
|
@@ -27,12 +27,14 @@ var serial = 0;
|
|
|
27
27
|
* which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
28
28
|
*/
|
|
29
29
|
var ColorPickerComponent = /** @class */ (function () {
|
|
30
|
-
function ColorPickerComponent(popupService, cdr, localizationService, ngZone) {
|
|
30
|
+
function ColorPickerComponent(host, popupService, cdr, localizationService, ngZone, renderer) {
|
|
31
31
|
var _this = this;
|
|
32
|
+
this.host = host;
|
|
32
33
|
this.popupService = popupService;
|
|
33
34
|
this.cdr = cdr;
|
|
34
35
|
this.localizationService = localizationService;
|
|
35
36
|
this.ngZone = ngZone;
|
|
37
|
+
this.renderer = renderer;
|
|
36
38
|
this.hostClasses = true;
|
|
37
39
|
/**
|
|
38
40
|
* @hidden
|
|
@@ -137,6 +139,9 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
137
139
|
this._popupSettings = { animate: true };
|
|
138
140
|
this._paletteSettings = {};
|
|
139
141
|
this._gradientSettings = { opacity: true, delay: 0 };
|
|
142
|
+
this._size = 'medium';
|
|
143
|
+
this._rounded = 'medium';
|
|
144
|
+
this._fillMode = 'solid';
|
|
140
145
|
this.notifyNgTouched = function () { };
|
|
141
146
|
this.notifyNgChanged = function () { };
|
|
142
147
|
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
@@ -215,6 +220,70 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
215
220
|
enumerable: true,
|
|
216
221
|
configurable: true
|
|
217
222
|
});
|
|
223
|
+
Object.defineProperty(ColorPickerComponent.prototype, "size", {
|
|
224
|
+
get: function () {
|
|
225
|
+
return this._size;
|
|
226
|
+
},
|
|
227
|
+
/**
|
|
228
|
+
* The size property specifies the font size and line height of the ColorPicker
|
|
229
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-size)).
|
|
230
|
+
*
|
|
231
|
+
* The possible values are:
|
|
232
|
+
* * `'small'`
|
|
233
|
+
* * `'medium'` (default)
|
|
234
|
+
* * `'large'`
|
|
235
|
+
* * `null`
|
|
236
|
+
*/
|
|
237
|
+
set: function (size) {
|
|
238
|
+
this.handleClasses(size, 'size');
|
|
239
|
+
this._size = size;
|
|
240
|
+
},
|
|
241
|
+
enumerable: true,
|
|
242
|
+
configurable: true
|
|
243
|
+
});
|
|
244
|
+
Object.defineProperty(ColorPickerComponent.prototype, "rounded", {
|
|
245
|
+
get: function () {
|
|
246
|
+
return this._rounded;
|
|
247
|
+
},
|
|
248
|
+
/**
|
|
249
|
+
* The rounded property specifies the border radius of the ColorPicker
|
|
250
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-rounded)).
|
|
251
|
+
*
|
|
252
|
+
* The possible values are:
|
|
253
|
+
* * `'small'`
|
|
254
|
+
* * `'medium'` (default)
|
|
255
|
+
* * `'large'`
|
|
256
|
+
* * `'full'`
|
|
257
|
+
* * `null`
|
|
258
|
+
*/
|
|
259
|
+
set: function (rounded) {
|
|
260
|
+
this.handleClasses(rounded, 'rounded');
|
|
261
|
+
this._rounded = rounded;
|
|
262
|
+
},
|
|
263
|
+
enumerable: true,
|
|
264
|
+
configurable: true
|
|
265
|
+
});
|
|
266
|
+
Object.defineProperty(ColorPickerComponent.prototype, "fillMode", {
|
|
267
|
+
get: function () {
|
|
268
|
+
return this._fillMode;
|
|
269
|
+
},
|
|
270
|
+
/**
|
|
271
|
+
* The fillMode property specifies the background and border styles of the ColorPicker
|
|
272
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-fillMode)).
|
|
273
|
+
*
|
|
274
|
+
* The possible values are:
|
|
275
|
+
* * `'flat'`
|
|
276
|
+
* * `'solid'` (default)
|
|
277
|
+
* * `'outline'`
|
|
278
|
+
* * `null`
|
|
279
|
+
*/
|
|
280
|
+
set: function (fillMode) {
|
|
281
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
282
|
+
this._fillMode = fillMode;
|
|
283
|
+
},
|
|
284
|
+
enumerable: true,
|
|
285
|
+
configurable: true
|
|
286
|
+
});
|
|
218
287
|
Object.defineProperty(ColorPickerComponent.prototype, "isOpen", {
|
|
219
288
|
/**
|
|
220
289
|
* Indicates whether the ColorPicker popup is open.
|
|
@@ -252,6 +321,13 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
252
321
|
columns: this._paletteSettings.columns || presetColumns || 10
|
|
253
322
|
};
|
|
254
323
|
};
|
|
324
|
+
ColorPickerComponent.prototype.ngAfterViewInit = function () {
|
|
325
|
+
var _this = this;
|
|
326
|
+
var stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
327
|
+
stylingInputs.forEach(function (input) {
|
|
328
|
+
_this.handleClasses(_this[input], input);
|
|
329
|
+
});
|
|
330
|
+
};
|
|
255
331
|
ColorPickerComponent.prototype.ngOnChanges = function (changes) {
|
|
256
332
|
if (changes.format && changes.format.currentValue === 'name') {
|
|
257
333
|
this.activeView = 'palette';
|
|
@@ -445,6 +521,16 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
445
521
|
ColorPickerComponent.prototype.isEmpty = function () {
|
|
446
522
|
return false;
|
|
447
523
|
};
|
|
524
|
+
ColorPickerComponent.prototype.handleClasses = function (value, input) {
|
|
525
|
+
var elem = this.host.nativeElement;
|
|
526
|
+
var classes = utils_2.getStylingClasses('picker', input, this[input], value);
|
|
527
|
+
if (classes.toRemove) {
|
|
528
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
529
|
+
}
|
|
530
|
+
if (classes.toAdd) {
|
|
531
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
532
|
+
}
|
|
533
|
+
};
|
|
448
534
|
ColorPickerComponent.prototype.popupBlurInvalid = function (ev) {
|
|
449
535
|
var focusInPopupElement = this.popupRef.popupElement.contains(ev.relatedTarget);
|
|
450
536
|
var wrapperClicked = ev.relatedTarget === this.wrapper.nativeElement;
|
|
@@ -538,6 +624,8 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
538
624
|
var ColorPickerComponent_1;
|
|
539
625
|
tslib_1.__decorate([
|
|
540
626
|
core_1.HostBinding('class.k-colorpicker'),
|
|
627
|
+
core_1.HostBinding('class.k-icon-picker'),
|
|
628
|
+
core_1.HostBinding('class.k-picker'),
|
|
541
629
|
tslib_1.__metadata("design:type", Boolean)
|
|
542
630
|
], ColorPickerComponent.prototype, "hostClasses", void 0);
|
|
543
631
|
tslib_1.__decorate([
|
|
@@ -613,6 +701,21 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
613
701
|
core_1.Input(),
|
|
614
702
|
tslib_1.__metadata("design:type", String)
|
|
615
703
|
], ColorPickerComponent.prototype, "actionsLayout", void 0);
|
|
704
|
+
tslib_1.__decorate([
|
|
705
|
+
core_1.Input(),
|
|
706
|
+
tslib_1.__metadata("design:type", String),
|
|
707
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
708
|
+
], ColorPickerComponent.prototype, "size", null);
|
|
709
|
+
tslib_1.__decorate([
|
|
710
|
+
core_1.Input(),
|
|
711
|
+
tslib_1.__metadata("design:type", String),
|
|
712
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
713
|
+
], ColorPickerComponent.prototype, "rounded", null);
|
|
714
|
+
tslib_1.__decorate([
|
|
715
|
+
core_1.Input(),
|
|
716
|
+
tslib_1.__metadata("design:type", String),
|
|
717
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
718
|
+
], ColorPickerComponent.prototype, "fillMode", null);
|
|
616
719
|
tslib_1.__decorate([
|
|
617
720
|
core_1.Output(),
|
|
618
721
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
@@ -683,12 +786,14 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
683
786
|
useValue: 'kendo.colorpicker'
|
|
684
787
|
}
|
|
685
788
|
],
|
|
686
|
-
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span\n #wrapper\n [ngClass]=\"{\n 'k-
|
|
789
|
+
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span\n #wrapper\n [ngClass]=\"{\n 'k-input-inner': true,\n 'k-disabled': this.disabled,\n 'k-focus': this.isFocused\n }\"\n role=\"listbox\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-readonly]=\"readonly\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"colorPickerAriaLabel\"\n [id]=\"focusableId\"\n [attr.tabindex]=\"tabindex\"\n (focus)=\"handleWrapperFocus()\"\n (blur)=\"handleWrapperBlur()\"\n (mousedown)=\"$event.preventDefault()\"\n (keydown)=\"handleWrapperKeyDown($event)\"\n >\n <span\n class=\"k-value-icon k-color-preview\"\n [ngClass]=\"{'k-icon-color-preview': iconStyles, 'k-no-color': !value}\"\n (click)=\"handleActiveColorClick()\">\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 type=\"button\"\n class=\"k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button\"\n [attr.aria-label]=\"colorPickerAriaLabel\"\n (click)=\"togglePopup()\">\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 (focusout)=\"handlePopupBlur($event)\"\n (cancel)=\"handleCancelEvent($event)\"\n (valueChange)=\"handleValueChange($event)\"\n (keydown)=\"handlePopupKeyDown($event)\"\n (activeViewChange)=\"activeViewChange.emit($event)\"\n (actionButtonClick)=\"togglePopup()\">\n </kendo-flatcolorpicker>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
687
790
|
}),
|
|
688
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
791
|
+
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
792
|
+
kendo_angular_popup_1.PopupService,
|
|
689
793
|
core_1.ChangeDetectorRef,
|
|
690
794
|
kendo_angular_l10n_1.LocalizationService,
|
|
691
|
-
core_1.NgZone
|
|
795
|
+
core_1.NgZone,
|
|
796
|
+
core_1.Renderer2])
|
|
692
797
|
], ColorPickerComponent);
|
|
693
798
|
return ColorPickerComponent;
|
|
694
799
|
}());
|
|
@@ -43,7 +43,7 @@ var FlatColorPickerActionButtonsComponent = /** @class */ (function () {
|
|
|
43
43
|
FlatColorPickerActionButtonsComponent = tslib_1.__decorate([
|
|
44
44
|
core_1.Component({
|
|
45
45
|
selector: '[kendoFlatColorPickerActionButtons]',
|
|
46
|
-
template: "\n <button\n class=\"k-coloreditor-cancel k-button\"\n [attr.title]=\"getText('cancelButton')\"\n (click)=\"onActionButtonClick('cancel', $event)\"\n >{{getText('cancelButton')}}</button>\n <button #last\n class=\"k-coloreditor-apply k-button k-primary\"\n [attr.title]=\"getText('applyButton')\"\n (click)=\"onActionButtonClick('apply', $event)\"\n >{{getText('applyButton')}}</button>\n "
|
|
46
|
+
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 "
|
|
47
47
|
}),
|
|
48
48
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService])
|
|
49
49
|
], FlatColorPickerActionButtonsComponent);
|
|
@@ -87,7 +87,7 @@ var FlatColorPickerHeaderComponent = /** @class */ (function () {
|
|
|
87
87
|
FlatColorPickerHeaderComponent = tslib_1.__decorate([
|
|
88
88
|
core_1.Component({
|
|
89
89
|
selector: '[kendoFlatColorPickerHeader]',
|
|
90
|
-
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-
|
|
90
|
+
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 "
|
|
91
91
|
}),
|
|
92
92
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService])
|
|
93
93
|
], FlatColorPickerHeaderComponent);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/npm/common/utils.js
CHANGED
|
@@ -36,3 +36,40 @@ exports.fitIntoBounds = function (contender, min, max) {
|
|
|
36
36
|
}
|
|
37
37
|
return contender <= min ? min : contender >= max ? max : contender;
|
|
38
38
|
};
|
|
39
|
+
var SIZES = {
|
|
40
|
+
small: 'sm',
|
|
41
|
+
medium: 'md',
|
|
42
|
+
large: 'lg'
|
|
43
|
+
};
|
|
44
|
+
var ROUNDNESS = {
|
|
45
|
+
small: 'sm',
|
|
46
|
+
medium: 'md',
|
|
47
|
+
large: 'lg',
|
|
48
|
+
full: 'full'
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*
|
|
53
|
+
* Returns the styling classes to be added and removed
|
|
54
|
+
*/
|
|
55
|
+
exports.getStylingClasses = function (componentType, stylingOption, previousValue, newValue) {
|
|
56
|
+
switch (stylingOption) {
|
|
57
|
+
case 'size':
|
|
58
|
+
return {
|
|
59
|
+
toRemove: "k-" + componentType + "-" + SIZES[previousValue],
|
|
60
|
+
toAdd: newValue ? "k-" + componentType + "-" + SIZES[newValue] : null
|
|
61
|
+
};
|
|
62
|
+
case 'rounded':
|
|
63
|
+
return {
|
|
64
|
+
toRemove: "k-rounded-" + ROUNDNESS[previousValue],
|
|
65
|
+
toAdd: newValue ? "k-rounded-" + ROUNDNESS[newValue] : null
|
|
66
|
+
};
|
|
67
|
+
case 'fillMode':
|
|
68
|
+
return {
|
|
69
|
+
toRemove: "k-" + componentType + "-" + previousValue,
|
|
70
|
+
toAdd: newValue ? "k-" + componentType + "-" + newValue : null
|
|
71
|
+
};
|
|
72
|
+
default:
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
};
|
package/dist/npm/main.js
CHANGED
|
@@ -13,8 +13,6 @@ var label_template_directive_1 = require("./sliders-common/label-template.direct
|
|
|
13
13
|
exports.LabelTemplateDirective = label_template_directive_1.LabelTemplateDirective;
|
|
14
14
|
var switch_component_1 = require("./switch/switch.component");
|
|
15
15
|
exports.SwitchComponent = switch_component_1.SwitchComponent;
|
|
16
|
-
var textbox_container_component_1 = require("./textbox/textbox-container.component");
|
|
17
|
-
exports.TextBoxContainerComponent = textbox_container_component_1.TextBoxContainerComponent;
|
|
18
16
|
var textbox_directive_1 = require("./textbox/textbox.directive");
|
|
19
17
|
exports.TextBoxDirective = textbox_directive_1.TextBoxDirective;
|
|
20
18
|
var textarea_directive_1 = require("./shared/textarea.directive");
|