@progress/kendo-angular-inputs 7.5.2 → 8.0.0-dev.202201101634
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-contrast-svg.component.js +95 -0
- package/dist/es/colorpicker/color-gradient.component.js +109 -81
- package/dist/es/colorpicker/color-input.component.js +39 -18
- package/dist/es/colorpicker/color-palette.component.js +28 -18
- package/dist/es/colorpicker/colorpicker.component.js +297 -80
- package/dist/es/colorpicker/constants.js +12 -0
- package/dist/es/colorpicker/contrast-validation.component.js +8 -6
- package/dist/es/colorpicker/contrast.component.js +6 -8
- package/dist/es/colorpicker/{models → events}/active-color-click-event.js +0 -0
- package/dist/es/colorpicker/events/cancel-event.js +19 -0
- package/dist/es/colorpicker/events/close-event.js +17 -0
- package/dist/es/colorpicker/{models → events}/kendo-drag-event.js +0 -0
- package/dist/es/colorpicker/events/open-event.js +17 -0
- package/dist/es/colorpicker/events.js +8 -0
- package/dist/es/colorpicker/flatcolorpicker-actions.component.js +50 -0
- package/dist/es/colorpicker/flatcolorpicker-header.component.js +94 -0
- package/dist/es/colorpicker/flatcolorpicker.component.js +553 -0
- package/dist/es/colorpicker/localization/colorgradient-localization.service.js +7 -7
- package/dist/es/colorpicker/localization/colorpalette-localization.service.js +7 -7
- package/dist/es/colorpicker/localization/custom-messages.component.js +1 -1
- package/dist/es/colorpicker/localization/flatcolorpicker-localization.service.js +34 -0
- package/dist/es/colorpicker/localization/localized-colorpicker-messages.directive.js +1 -1
- package/dist/es/colorpicker/localization/messages.js +36 -0
- package/dist/es/colorpicker/models/{color-picker-view.js → actions-layout.js} +0 -0
- package/dist/{es2015/colorpicker/models/color-picker-view.js → es/colorpicker/models/colorpicker-view.js} +0 -0
- package/dist/es/colorpicker/{utils → models}/palette-presets.js +0 -0
- package/dist/es/colorpicker/models.js +1 -2
- package/dist/es/colorpicker/services/flatcolorpicker.service.js +41 -0
- package/dist/es/colorpicker/utils/color-parser.js +18 -5
- package/dist/es/colorpicker/utils/contrast-curve.js +91 -0
- package/dist/es/colorpicker/utils.js +1 -1
- package/dist/es/colorpicker.module.js +9 -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/{es2015/colorpicker/models/kendo-drag-event.js → es/common/models.js} +0 -0
- package/dist/es/common/utils.js +37 -0
- package/dist/es/index.js +5 -0
- package/dist/es/main.js +4 -2
- 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/slider/slider.component.js +1 -1
- 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-contrast-svg.component.d.ts +26 -0
- package/dist/es2015/colorpicker/color-contrast-svg.component.js +97 -0
- package/dist/es2015/colorpicker/color-gradient.component.d.ts +32 -43
- package/dist/es2015/colorpicker/color-gradient.component.js +126 -93
- package/dist/es2015/colorpicker/color-input.component.d.ts +11 -4
- package/dist/es2015/colorpicker/color-input.component.js +52 -32
- package/dist/es2015/colorpicker/color-palette.component.d.ts +8 -3
- package/dist/es2015/colorpicker/color-palette.component.js +28 -18
- package/dist/es2015/colorpicker/colorpicker.component.d.ts +129 -23
- package/dist/es2015/colorpicker/colorpicker.component.js +319 -125
- package/dist/es2015/colorpicker/constants.d.ts +12 -0
- package/dist/es2015/colorpicker/constants.js +12 -0
- package/dist/es2015/colorpicker/contrast-validation.component.d.ts +1 -1
- package/dist/es2015/colorpicker/contrast-validation.component.js +16 -12
- package/dist/es2015/colorpicker/contrast.component.d.ts +1 -3
- package/dist/es2015/colorpicker/contrast.component.js +17 -17
- package/dist/es2015/colorpicker/{models → events}/active-color-click-event.d.ts +0 -0
- package/dist/es2015/colorpicker/{models → events}/active-color-click-event.js +0 -0
- package/dist/es2015/colorpicker/events/cancel-event.d.ts +15 -0
- package/dist/es2015/colorpicker/events/cancel-event.js +14 -0
- package/dist/es2015/colorpicker/events/close-event.d.ts +10 -0
- package/dist/es2015/colorpicker/events/close-event.js +10 -0
- package/dist/es2015/colorpicker/{models → events}/kendo-drag-event.d.ts +0 -0
- package/dist/es2015/colorpicker/events/kendo-drag-event.js +4 -0
- package/dist/es2015/colorpicker/events/open-event.d.ts +10 -0
- package/dist/es2015/colorpicker/events/open-event.js +10 -0
- package/dist/es2015/colorpicker/events.d.ts +8 -0
- package/dist/es2015/colorpicker/events.js +8 -0
- package/dist/es2015/colorpicker/flatcolorpicker-actions.component.d.ts +18 -0
- package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +60 -0
- package/dist/es2015/colorpicker/flatcolorpicker-header.component.d.ts +30 -0
- package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +131 -0
- package/dist/es2015/colorpicker/flatcolorpicker.component.d.ts +214 -0
- package/dist/es2015/colorpicker/flatcolorpicker.component.js +593 -0
- package/dist/es2015/colorpicker/localization/colorgradient-localization.service.d.ts +3 -3
- package/dist/es2015/colorpicker/localization/colorgradient-localization.service.js +7 -7
- package/dist/es2015/colorpicker/localization/colorpalette-localization.service.d.ts +3 -3
- package/dist/es2015/colorpicker/localization/colorpalette-localization.service.js +7 -7
- package/dist/es2015/colorpicker/localization/custom-messages.component.js +1 -1
- package/dist/es2015/colorpicker/localization/flatcolorpicker-localization.service.d.ts +14 -0
- package/dist/es2015/colorpicker/localization/flatcolorpicker-localization.service.js +31 -0
- package/dist/es2015/colorpicker/localization/localized-colorpicker-messages.directive.js +1 -1
- package/dist/es2015/colorpicker/localization/messages.d.ts +36 -0
- package/dist/es2015/colorpicker/localization/messages.js +36 -0
- package/dist/es2015/colorpicker/models/actions-layout.d.ts +8 -0
- package/dist/es2015/colorpicker/models/actions-layout.js +4 -0
- package/dist/es2015/colorpicker/models/colorpicker-view.d.ts +8 -0
- package/dist/es2015/colorpicker/models/colorpicker-view.js +4 -0
- package/dist/es2015/colorpicker/models/gradient-settings.d.ts +4 -3
- package/dist/es2015/colorpicker/models/output-format.d.ts +0 -5
- package/dist/es2015/colorpicker/{utils → models}/palette-presets.d.ts +0 -0
- package/dist/es2015/colorpicker/{utils → models}/palette-presets.js +0 -0
- package/dist/es2015/colorpicker/models/palette-settings.d.ts +2 -3
- package/dist/es2015/colorpicker/models/tile-size.d.ts +1 -5
- package/dist/es2015/colorpicker/models.d.ts +10 -10
- package/dist/es2015/colorpicker/models.js +1 -2
- package/dist/es2015/colorpicker/services/flatcolorpicker.service.d.ts +12 -0
- package/dist/es2015/colorpicker/services/flatcolorpicker.service.js +38 -0
- package/dist/es2015/colorpicker/utils/color-parser.d.ts +8 -2
- package/dist/es2015/colorpicker/utils/color-parser.js +15 -5
- package/dist/es2015/colorpicker/utils/contrast-curve.d.ts +37 -0
- package/dist/es2015/colorpicker/utils/contrast-curve.js +85 -0
- package/dist/es2015/colorpicker/utils.d.ts +1 -1
- package/dist/es2015/colorpicker/utils.js +1 -1
- package/dist/es2015/colorpicker.module.js +9 -1
- package/dist/es2015/{colorpicker/models/color-picker-view.d.ts → common/models/fillmode.d.ts} +5 -5
- 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.d.ts +5 -0
- package/dist/es2015/index.js +5 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/main.d.ts +5 -2
- package/dist/es2015/main.js +4 -2
- 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/slider/slider.component.js +18 -23
- 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 +114 -30
- 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 +3332 -1702
- package/dist/fesm5/index.js +3115 -1463
- package/dist/npm/checkbox/checkbox.directive.js +78 -2
- package/dist/npm/colorpicker/color-contrast-svg.component.js +97 -0
- package/dist/npm/colorpicker/color-gradient.component.js +109 -81
- package/dist/npm/colorpicker/color-input.component.js +38 -17
- package/dist/npm/colorpicker/color-palette.component.js +29 -19
- package/dist/npm/colorpicker/colorpicker.component.js +303 -86
- package/dist/npm/colorpicker/constants.js +12 -0
- package/dist/npm/colorpicker/contrast-validation.component.js +8 -6
- package/dist/npm/colorpicker/contrast.component.js +6 -8
- package/dist/npm/colorpicker/{models → events}/active-color-click-event.js +0 -0
- package/dist/npm/colorpicker/events/cancel-event.js +21 -0
- package/dist/npm/colorpicker/events/close-event.js +19 -0
- package/dist/npm/colorpicker/{models → events}/kendo-drag-event.js +0 -0
- package/dist/npm/colorpicker/events/open-event.js +19 -0
- package/dist/npm/colorpicker/events.js +11 -0
- package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +52 -0
- package/dist/npm/colorpicker/flatcolorpicker-header.component.js +96 -0
- package/dist/npm/colorpicker/flatcolorpicker.component.js +555 -0
- package/dist/npm/colorpicker/localization/colorgradient-localization.service.js +7 -7
- package/dist/npm/colorpicker/localization/colorpalette-localization.service.js +7 -7
- package/dist/npm/colorpicker/localization/custom-messages.component.js +1 -1
- package/dist/npm/colorpicker/localization/flatcolorpicker-localization.service.js +36 -0
- package/dist/npm/colorpicker/localization/localized-colorpicker-messages.directive.js +1 -1
- package/dist/npm/colorpicker/localization/messages.js +36 -0
- package/dist/npm/colorpicker/models/{color-picker-view.js → actions-layout.js} +0 -0
- package/dist/npm/colorpicker/models/colorpicker-view.js +6 -0
- package/dist/npm/colorpicker/{utils → models}/palette-presets.js +0 -0
- package/dist/npm/colorpicker/models.js +1 -2
- package/dist/npm/colorpicker/services/flatcolorpicker.service.js +43 -0
- package/dist/npm/colorpicker/utils/color-parser.js +18 -5
- package/dist/npm/colorpicker/utils/contrast-curve.js +93 -0
- package/dist/npm/colorpicker/utils.js +1 -1
- package/dist/npm/colorpicker.module.js +9 -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/index.js +10 -0
- package/dist/npm/main.js +7 -4
- 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/slider/slider.component.js +1 -1
- 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 +12 -11
- package/dist/es/colorpicker/models/preventable-event.js +0 -29
- package/dist/es/textbox/floating-label-input-adapter.js +0 -58
- package/dist/es/textbox/textbox-container.component.js +0 -224
- package/dist/es2015/colorpicker/models/preventable-event.d.ts +0 -21
- package/dist/es2015/colorpicker/models/preventable-event.js +0 -27
- 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/colorpicker/models/preventable-event.js +0 -31
- package/dist/npm/textbox/floating-label-input-adapter.js +0 -60
- package/dist/npm/textbox/textbox-container.component.js +0 -226
|
@@ -23,3 +23,15 @@ export declare const AAA_RATIO = 7;
|
|
|
23
23
|
* @hidden
|
|
24
24
|
*/
|
|
25
25
|
export declare const AA_RATIO = 4.5;
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
export declare const DEFAULT_PRESET = "office";
|
|
30
|
+
/**
|
|
31
|
+
* @hidden
|
|
32
|
+
*/
|
|
33
|
+
export declare const DEFAULT_ACCESSIBLE_PRESET = "accessible";
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
export declare const STEP_COUNT = 16;
|
|
@@ -22,3 +22,15 @@ export const AAA_RATIO = 7.0;
|
|
|
22
22
|
* @hidden
|
|
23
23
|
*/
|
|
24
24
|
export const AA_RATIO = 4.5;
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export const DEFAULT_PRESET = 'office';
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
export const DEFAULT_ACCESSIBLE_PRESET = 'accessible';
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export const STEP_COUNT = 16;
|
|
@@ -9,8 +9,8 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
|
9
9
|
export declare class ContrastValidationComponent {
|
|
10
10
|
private localization;
|
|
11
11
|
type: string;
|
|
12
|
-
ratio: number;
|
|
13
12
|
pass: boolean;
|
|
13
|
+
value: string;
|
|
14
14
|
constructor(localization: LocalizationService);
|
|
15
15
|
readonly passMessage: string;
|
|
16
16
|
readonly failMessage: string;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
+
import { AA_RATIO, AAA_RATIO } from './constants';
|
|
6
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
8
|
import { Component, Input } from '@angular/core';
|
|
8
9
|
/**
|
|
@@ -19,34 +20,37 @@ let ContrastValidationComponent = class ContrastValidationComponent {
|
|
|
19
20
|
return this.localization.get('failContrast');
|
|
20
21
|
}
|
|
21
22
|
get contrastText() {
|
|
22
|
-
|
|
23
|
+
let ratio = this.type === 'AA' ? AA_RATIO : AAA_RATIO;
|
|
24
|
+
return `${this.type}: ${ratio.toFixed(1)}`;
|
|
23
25
|
}
|
|
24
26
|
};
|
|
25
27
|
tslib_1.__decorate([
|
|
26
28
|
Input(),
|
|
27
29
|
tslib_1.__metadata("design:type", String)
|
|
28
30
|
], ContrastValidationComponent.prototype, "type", void 0);
|
|
29
|
-
tslib_1.__decorate([
|
|
30
|
-
Input(),
|
|
31
|
-
tslib_1.__metadata("design:type", Number)
|
|
32
|
-
], ContrastValidationComponent.prototype, "ratio", void 0);
|
|
33
31
|
tslib_1.__decorate([
|
|
34
32
|
Input(),
|
|
35
33
|
tslib_1.__metadata("design:type", Boolean)
|
|
36
34
|
], ContrastValidationComponent.prototype, "pass", void 0);
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
Input(),
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
38
|
+
], ContrastValidationComponent.prototype, "value", void 0);
|
|
37
39
|
ContrastValidationComponent = tslib_1.__decorate([
|
|
38
40
|
Component({
|
|
39
41
|
selector: '[kendoContrastValidation]',
|
|
40
42
|
template: `
|
|
41
43
|
<span>{{contrastText}}</span>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
<ng-container *ngIf="value">
|
|
45
|
+
<span class="k-contrast-validation k-text-success" *ngIf="pass">
|
|
46
|
+
{{passMessage}}
|
|
47
|
+
<span class="k-icon k-i-check"></span>
|
|
48
|
+
</span>
|
|
49
|
+
<span class="k-contrast-validation k-text-error" *ngIf="!pass">
|
|
50
|
+
{{failMessage}}
|
|
48
51
|
<span class="k-icon k-i-close"></span>
|
|
49
|
-
|
|
52
|
+
</span>
|
|
53
|
+
</ng-container>
|
|
50
54
|
`
|
|
51
55
|
}),
|
|
52
56
|
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
@@ -10,11 +10,9 @@ export declare class ContrastComponent {
|
|
|
10
10
|
private localization;
|
|
11
11
|
value: string;
|
|
12
12
|
ratio: string;
|
|
13
|
-
aaRatio: number;
|
|
14
|
-
aaaRatio: number;
|
|
15
13
|
constructor(localization: LocalizationService);
|
|
16
14
|
readonly formatedRatio: string;
|
|
17
|
-
readonly
|
|
15
|
+
readonly contrastRatioText: string;
|
|
18
16
|
readonly satisfiesAACondition: boolean;
|
|
19
17
|
readonly satisfiesAAACondition: boolean;
|
|
20
18
|
readonly contrastRatio: number;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
6
|
import { Component, Input } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { getContrastFromTwoRGBAs, getRGBA } from './utils';
|
|
9
9
|
import { AA_RATIO, AAA_RATIO } from './constants';
|
|
10
10
|
/**
|
|
@@ -13,20 +13,18 @@ import { AA_RATIO, AAA_RATIO } from './constants';
|
|
|
13
13
|
let ContrastComponent = class ContrastComponent {
|
|
14
14
|
constructor(localization) {
|
|
15
15
|
this.localization = localization;
|
|
16
|
-
this.aaRatio = AA_RATIO;
|
|
17
|
-
this.aaaRatio = AAA_RATIO;
|
|
18
16
|
}
|
|
19
17
|
get formatedRatio() {
|
|
20
18
|
return this.contrastRatio.toFixed(2);
|
|
21
19
|
}
|
|
22
|
-
get
|
|
23
|
-
return this.localization.get('contrastRatio')
|
|
20
|
+
get contrastRatioText() {
|
|
21
|
+
return `${this.localization.get('contrastRatio')}: ${this.value ? this.formatedRatio : 'n/a'}`;
|
|
24
22
|
}
|
|
25
23
|
get satisfiesAACondition() {
|
|
26
|
-
return this.contrastRatio >=
|
|
24
|
+
return this.contrastRatio >= AA_RATIO;
|
|
27
25
|
}
|
|
28
26
|
get satisfiesAAACondition() {
|
|
29
|
-
return this.contrastRatio >=
|
|
27
|
+
return this.contrastRatio >= AAA_RATIO;
|
|
30
28
|
}
|
|
31
29
|
get contrastRatio() {
|
|
32
30
|
let contrast = getContrastFromTwoRGBAs(getRGBA(this.value), getRGBA(this.ratio));
|
|
@@ -46,23 +44,25 @@ ContrastComponent = tslib_1.__decorate([
|
|
|
46
44
|
selector: '[kendoContrastTool]',
|
|
47
45
|
template: `
|
|
48
46
|
<div class="k-contrast-ratio">
|
|
49
|
-
<span class="k-contrast-ratio-text">{{
|
|
50
|
-
<
|
|
51
|
-
<span class="k-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<span class="k-
|
|
56
|
-
|
|
47
|
+
<span class="k-contrast-ratio-text">{{contrastRatioText}}</span>
|
|
48
|
+
<ng-container *ngIf="value">
|
|
49
|
+
<span class="k-contrast-validation k-text-success" *ngIf="satisfiesAACondition">
|
|
50
|
+
<span class="k-icon k-i-check"></span>
|
|
51
|
+
<span class="k-icon k-i-check" *ngIf="satisfiesAAACondition"></span>
|
|
52
|
+
</span>
|
|
53
|
+
<span class="k-contrast-validation k-text-error" *ngIf="!satisfiesAACondition">
|
|
54
|
+
<span class="k-icon k-i-close"></span>
|
|
55
|
+
</span>
|
|
56
|
+
</ng-container>
|
|
57
57
|
</div>
|
|
58
58
|
<div kendoContrastValidation
|
|
59
59
|
type="AA"
|
|
60
|
-
[
|
|
60
|
+
[value]="value"
|
|
61
61
|
[pass]="satisfiesAACondition">
|
|
62
62
|
</div>
|
|
63
63
|
<div kendoContrastValidation
|
|
64
64
|
type="AAA"
|
|
65
|
-
[
|
|
65
|
+
[value]="value"
|
|
66
66
|
[pass]="satisfiesAAACondition">
|
|
67
67
|
</div>
|
|
68
68
|
`
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
import { PreventableEvent } from "@progress/kendo-angular-common";
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the `cancel` event of the ColorPicker and FlatColorPicker components.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ColorPickerCancelEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* The DOM event that triggered the `cancel` event.
|
|
12
|
+
*/
|
|
13
|
+
originalEvent: any;
|
|
14
|
+
constructor(originalEvent: any);
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
import { PreventableEvent } from "@progress/kendo-angular-common";
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the `cancel` event of the ColorPicker and FlatColorPicker components.
|
|
8
|
+
*/
|
|
9
|
+
export class ColorPickerCancelEvent extends PreventableEvent {
|
|
10
|
+
constructor(originalEvent) {
|
|
11
|
+
super();
|
|
12
|
+
this.originalEvent = originalEvent;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import { PreventableEvent } from "@progress/kendo-angular-common";
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the `close` event of the ColorPicker component.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ColorPickerCloseEvent extends PreventableEvent {
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import { PreventableEvent } from "@progress/kendo-angular-common";
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the `close` event of the ColorPicker component.
|
|
8
|
+
*/
|
|
9
|
+
export class ColorPickerCloseEvent extends PreventableEvent {
|
|
10
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
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
|
+
*-------------------------------------------------------------------------------------------*/
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import { PreventableEvent } from "@progress/kendo-angular-common";
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the `open` event of the ColorPicker component.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ColorPickerOpenEvent extends PreventableEvent {
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import { PreventableEvent } from "@progress/kendo-angular-common";
|
|
6
|
+
/**
|
|
7
|
+
* Arguments for the `open` event of the ColorPicker component.
|
|
8
|
+
*/
|
|
9
|
+
export class ColorPickerOpenEvent extends PreventableEvent {
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
export * from './events/cancel-event';
|
|
6
|
+
export * from './events/close-event';
|
|
7
|
+
export * from './events/open-event';
|
|
8
|
+
export * from './events/active-color-click-event';
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
export * from './events/cancel-event';
|
|
6
|
+
export * from './events/close-event';
|
|
7
|
+
export * from './events/open-event';
|
|
8
|
+
export * from './events/active-color-click-event';
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
import { EventEmitter, ElementRef } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export declare class FlatColorPickerActionButtonsComponent {
|
|
11
|
+
localizationService: LocalizationService;
|
|
12
|
+
hostClasses: boolean;
|
|
13
|
+
actionButtonClick: EventEmitter<any>;
|
|
14
|
+
lastButton: ElementRef;
|
|
15
|
+
constructor(localizationService: LocalizationService);
|
|
16
|
+
getText(text: string): string;
|
|
17
|
+
onActionButtonClick(type: string, ev: any): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
import * as tslib_1 from "tslib";
|
|
6
|
+
import { Component, HostBinding, EventEmitter, Output, ElementRef, ViewChild } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
let FlatColorPickerActionButtonsComponent = class FlatColorPickerActionButtonsComponent {
|
|
12
|
+
constructor(localizationService) {
|
|
13
|
+
this.localizationService = localizationService;
|
|
14
|
+
this.hostClasses = true;
|
|
15
|
+
this.actionButtonClick = new EventEmitter();
|
|
16
|
+
}
|
|
17
|
+
getText(text) {
|
|
18
|
+
return this.localizationService.get(text);
|
|
19
|
+
}
|
|
20
|
+
onActionButtonClick(type, ev) {
|
|
21
|
+
let args = {
|
|
22
|
+
target: type,
|
|
23
|
+
originalEvent: ev
|
|
24
|
+
};
|
|
25
|
+
this.actionButtonClick.emit(args);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
HostBinding('class.k-coloreditor-footer'),
|
|
30
|
+
HostBinding('class.k-actions'),
|
|
31
|
+
HostBinding('class.k-hstack'),
|
|
32
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
33
|
+
], FlatColorPickerActionButtonsComponent.prototype, "hostClasses", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
Output(),
|
|
36
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
37
|
+
], FlatColorPickerActionButtonsComponent.prototype, "actionButtonClick", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
ViewChild('last', { read: ElementRef, static: false }),
|
|
40
|
+
tslib_1.__metadata("design:type", ElementRef)
|
|
41
|
+
], FlatColorPickerActionButtonsComponent.prototype, "lastButton", void 0);
|
|
42
|
+
FlatColorPickerActionButtonsComponent = tslib_1.__decorate([
|
|
43
|
+
Component({
|
|
44
|
+
selector: '[kendoFlatColorPickerActionButtons]',
|
|
45
|
+
template: `
|
|
46
|
+
<button
|
|
47
|
+
class="k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base"
|
|
48
|
+
[attr.title]="getText('cancelButton')"
|
|
49
|
+
(click)="onActionButtonClick('cancel', $event)"
|
|
50
|
+
>{{getText('cancelButton')}}</button>
|
|
51
|
+
<button #last
|
|
52
|
+
class="k-coloreditor-apply k-button k-button-md k-button-solid k-button-solid-primary"
|
|
53
|
+
[attr.title]="getText('applyButton')"
|
|
54
|
+
(click)="onActionButtonClick('apply', $event)"
|
|
55
|
+
>{{getText('applyButton')}}</button>
|
|
56
|
+
`
|
|
57
|
+
}),
|
|
58
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
59
|
+
], FlatColorPickerActionButtonsComponent);
|
|
60
|
+
export { FlatColorPickerActionButtonsComponent };
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import { EventEmitter, QueryList, ElementRef } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { ColorPickerView } from './models';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare class FlatColorPickerHeaderComponent {
|
|
12
|
+
private localizationService;
|
|
13
|
+
hostClasses: boolean;
|
|
14
|
+
clearButton: boolean;
|
|
15
|
+
activeView: ColorPickerView;
|
|
16
|
+
views: Array<ColorPickerView>;
|
|
17
|
+
preview: boolean;
|
|
18
|
+
value: string;
|
|
19
|
+
selection: string;
|
|
20
|
+
viewChange: EventEmitter<string>;
|
|
21
|
+
valuePaneClick: EventEmitter<any>;
|
|
22
|
+
clearButtonClick: EventEmitter<any>;
|
|
23
|
+
viewButtonsCollection: QueryList<ElementRef>;
|
|
24
|
+
clearButtonElement: ElementRef;
|
|
25
|
+
constructor(localizationService: LocalizationService);
|
|
26
|
+
onViewButtonClick(view: ColorPickerView): void;
|
|
27
|
+
readonly viewButtons: boolean;
|
|
28
|
+
getViewButtonIcon(view: string): string;
|
|
29
|
+
getText(text: string): string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
import * as tslib_1 from "tslib";
|
|
6
|
+
import { Component, HostBinding, Input, Output, EventEmitter, ViewChild, ViewChildren, QueryList, ElementRef } from '@angular/core';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
let FlatColorPickerHeaderComponent = class FlatColorPickerHeaderComponent {
|
|
12
|
+
constructor(localizationService) {
|
|
13
|
+
this.localizationService = localizationService;
|
|
14
|
+
this.hostClasses = true;
|
|
15
|
+
this.viewChange = new EventEmitter();
|
|
16
|
+
this.valuePaneClick = new EventEmitter();
|
|
17
|
+
this.clearButtonClick = new EventEmitter();
|
|
18
|
+
}
|
|
19
|
+
onViewButtonClick(view) {
|
|
20
|
+
this.activeView = view;
|
|
21
|
+
this.viewChange.emit(view);
|
|
22
|
+
}
|
|
23
|
+
get viewButtons() {
|
|
24
|
+
return this.views && this.views.indexOf('gradient') >= 0 && this.views.indexOf('palette') >= 0;
|
|
25
|
+
}
|
|
26
|
+
getViewButtonIcon(view) {
|
|
27
|
+
return view === 'gradient' ? 'k-i-color-canvas' : 'k-i-palette';
|
|
28
|
+
}
|
|
29
|
+
getText(text) {
|
|
30
|
+
return this.localizationService.get(text);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
HostBinding('class.k-coloreditor-header'),
|
|
35
|
+
HostBinding('class.k-hstack'),
|
|
36
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
37
|
+
], FlatColorPickerHeaderComponent.prototype, "hostClasses", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
Input(),
|
|
40
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
41
|
+
], FlatColorPickerHeaderComponent.prototype, "clearButton", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
Input(),
|
|
44
|
+
tslib_1.__metadata("design:type", String)
|
|
45
|
+
], FlatColorPickerHeaderComponent.prototype, "activeView", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
Input(),
|
|
48
|
+
tslib_1.__metadata("design:type", Array)
|
|
49
|
+
], FlatColorPickerHeaderComponent.prototype, "views", void 0);
|
|
50
|
+
tslib_1.__decorate([
|
|
51
|
+
Input(),
|
|
52
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
53
|
+
], FlatColorPickerHeaderComponent.prototype, "preview", void 0);
|
|
54
|
+
tslib_1.__decorate([
|
|
55
|
+
Input(),
|
|
56
|
+
tslib_1.__metadata("design:type", String)
|
|
57
|
+
], FlatColorPickerHeaderComponent.prototype, "value", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
Input(),
|
|
60
|
+
tslib_1.__metadata("design:type", String)
|
|
61
|
+
], FlatColorPickerHeaderComponent.prototype, "selection", void 0);
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
Output(),
|
|
64
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
65
|
+
], FlatColorPickerHeaderComponent.prototype, "viewChange", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
Output(),
|
|
68
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
69
|
+
], FlatColorPickerHeaderComponent.prototype, "valuePaneClick", void 0);
|
|
70
|
+
tslib_1.__decorate([
|
|
71
|
+
Output(),
|
|
72
|
+
tslib_1.__metadata("design:type", EventEmitter)
|
|
73
|
+
], FlatColorPickerHeaderComponent.prototype, "clearButtonClick", void 0);
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
ViewChildren('viewButtons', { read: ElementRef }),
|
|
76
|
+
tslib_1.__metadata("design:type", QueryList)
|
|
77
|
+
], FlatColorPickerHeaderComponent.prototype, "viewButtonsCollection", void 0);
|
|
78
|
+
tslib_1.__decorate([
|
|
79
|
+
ViewChild('clearButton', { read: ElementRef, static: false }),
|
|
80
|
+
tslib_1.__metadata("design:type", ElementRef)
|
|
81
|
+
], FlatColorPickerHeaderComponent.prototype, "clearButtonElement", void 0);
|
|
82
|
+
FlatColorPickerHeaderComponent = tslib_1.__decorate([
|
|
83
|
+
Component({
|
|
84
|
+
selector: '[kendoFlatColorPickerHeader]',
|
|
85
|
+
template: `
|
|
86
|
+
<div class="k-coloreditor-header-actions k-hstack">
|
|
87
|
+
<div *ngIf="viewButtons" class="k-button-group k-button-group-flat">
|
|
88
|
+
<button *ngFor="let view of views"
|
|
89
|
+
#viewButtons
|
|
90
|
+
(click)="onViewButtonClick(view)"
|
|
91
|
+
class="k-button k-button-md k-button-flat k-button-flat-base k-icon-button"
|
|
92
|
+
[attr.title]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
93
|
+
[attr.aria-label]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
94
|
+
[attr.aria-pressed]="activeView === view"
|
|
95
|
+
[ngClass]="activeView === view ? 'k-state-selected' : ''"
|
|
96
|
+
>
|
|
97
|
+
<span
|
|
98
|
+
class="k-button-icon k-icon"
|
|
99
|
+
[ngClass]="getViewButtonIcon(view)">
|
|
100
|
+
</span>
|
|
101
|
+
</button>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="k-spacer"></div>
|
|
105
|
+
<div class="k-coloreditor-header-actions k-hstack">
|
|
106
|
+
<button *ngIf="clearButton"
|
|
107
|
+
#clearButton
|
|
108
|
+
class="k-button k-button-md k-button-flat k-button-flat-base k-icon-button k-coloreditor-reset"
|
|
109
|
+
[attr.aria-label]="getText('clearButton')"
|
|
110
|
+
[attr.title]="getText('clearButton')"
|
|
111
|
+
(click)="clearButtonClick.emit()">
|
|
112
|
+
<span class="k-button-icon k-icon k-i-reset-color"></span>
|
|
113
|
+
</button>
|
|
114
|
+
<div class="k-coloreditor-preview k-vstack" *ngIf="preview">
|
|
115
|
+
<span
|
|
116
|
+
class="k-coloreditor-preview-color k-color-preview"
|
|
117
|
+
[attr.title]="getText('previewColor')"
|
|
118
|
+
[style.background-color]="selection">
|
|
119
|
+
</span>
|
|
120
|
+
<span class="k-coloreditor-current-color k-color-preview"
|
|
121
|
+
[style.background-color]="value"
|
|
122
|
+
[attr.title]="getText('revertSelection')"
|
|
123
|
+
(click)="valuePaneClick.emit($event)">
|
|
124
|
+
</span>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
`
|
|
128
|
+
}),
|
|
129
|
+
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
130
|
+
], FlatColorPickerHeaderComponent);
|
|
131
|
+
export { FlatColorPickerHeaderComponent };
|