@progress/kendo-angular-inputs 17.0.0-develop.9 → 17.0.1-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.
- package/checkbox/checkbox.component.d.ts +1 -1
- package/checkbox/checkbox.directive.d.ts +1 -1
- package/checkbox/checked-state.d.ts +1 -1
- package/colorpicker/color-contrast-svg.component.d.ts +1 -1
- package/colorpicker/color-gradient-numeric-label.directive.d.ts +1 -1
- package/colorpicker/color-gradient.component.d.ts +1 -1
- package/colorpicker/color-input.component.d.ts +1 -1
- package/colorpicker/color-palette.component.d.ts +1 -1
- package/colorpicker/colorpicker.component.d.ts +1 -1
- package/colorpicker/contrast-validation.component.d.ts +1 -1
- package/colorpicker/contrast.component.d.ts +1 -1
- package/colorpicker/flatcolorpicker-actions.component.d.ts +1 -1
- package/colorpicker/flatcolorpicker-header.component.d.ts +1 -1
- package/colorpicker/flatcolorpicker.component.d.ts +1 -1
- package/colorpicker/localization/messages.d.ts +1 -1
- package/colorpicker/models/actions-layout.d.ts +1 -1
- package/colorpicker/models/colorpicker-view.d.ts +1 -1
- package/colorpicker/models/output-format.d.ts +1 -1
- package/common/models/fillmode.d.ts +1 -1
- package/common/models/rounded.d.ts +2 -2
- package/common/models/size.d.ts +1 -1
- package/common/models/type.d.ts +1 -1
- package/common/radio-checkbox.base.d.ts +1 -1
- package/common/utils.d.ts +1 -1
- package/{esm2020 → esm2022}/checkbox/checkbox.component.mjs +49 -44
- package/{esm2020 → esm2022}/checkbox/checkbox.directive.mjs +12 -10
- package/{esm2020 → esm2022}/checkbox.module.mjs +4 -4
- package/{esm2020 → esm2022}/colorpicker/color-contrast-svg.component.mjs +13 -7
- package/{esm2020 → esm2022}/colorpicker/color-gradient-numeric-label.directive.mjs +6 -3
- package/{esm2020 → esm2022}/colorpicker/color-gradient.component.mjs +142 -125
- package/{esm2020 → esm2022}/colorpicker/color-input.component.mjs +69 -49
- package/{esm2020 → esm2022}/colorpicker/color-palette.component.mjs +129 -98
- package/{esm2020 → esm2022}/colorpicker/colorpicker.component.mjs +211 -158
- package/{esm2020 → esm2022}/colorpicker/contrast-validation.component.mjs +10 -6
- package/{esm2020 → esm2022}/colorpicker/contrast.component.mjs +9 -6
- package/{esm2020 → esm2022}/colorpicker/events/active-color-click-event.mjs +2 -1
- package/{esm2020 → esm2022}/colorpicker/events/cancel-event.mjs +4 -0
- package/{esm2020 → esm2022}/colorpicker/flatcolorpicker-actions.component.mjs +11 -8
- package/{esm2020 → esm2022}/colorpicker/flatcolorpicker-header.component.mjs +23 -13
- package/{esm2020 → esm2022}/colorpicker/flatcolorpicker.component.mjs +155 -127
- package/{esm2020 → esm2022}/colorpicker/localization/colorgradient-localization.service.mjs +4 -3
- package/{esm2020 → esm2022}/colorpicker/localization/colorpalette-localization.service.mjs +4 -3
- package/{esm2020 → esm2022}/colorpicker/localization/colorpicker-localization.service.mjs +3 -3
- package/{esm2020 → esm2022}/colorpicker/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/colorpicker/localization/flatcolorpicker-localization.service.mjs +4 -3
- package/{esm2020 → esm2022}/colorpicker/localization/localized-colorpicker-messages.directive.mjs +9 -8
- package/esm2022/colorpicker/localization/messages.mjs +183 -0
- package/{esm2020 → esm2022}/colorpicker/services/color-palette.service.mjs +4 -6
- package/{esm2020 → esm2022}/colorpicker/services/flatcolorpicker.service.mjs +3 -3
- package/{esm2020 → esm2022}/colorpicker.module.mjs +4 -4
- package/{esm2020 → esm2022}/common/radio-checkbox.base.mjs +80 -56
- package/{esm2020 → esm2022}/formfield/error.component.mjs +18 -20
- package/{esm2020 → esm2022}/formfield/formfield.component.mjs +67 -55
- package/{esm2020 → esm2022}/formfield/hint.component.mjs +17 -19
- package/{esm2020 → esm2022}/formfield.module.mjs +4 -4
- package/{esm2020 → esm2022}/index.mjs +0 -1
- package/esm2022/inputs.module.mjs +96 -0
- package/{esm2020 → esm2022}/maskedtextbox/maskedtextbox.component.mjs +263 -223
- package/{esm2020 → esm2022}/maskedtextbox/masking.service.mjs +12 -14
- package/{esm2020 → esm2022}/maskedtextbox/parsing/parsers.mjs +1 -0
- package/{esm2020 → esm2022}/maskedtextbox/parsing/result.mjs +3 -0
- package/{esm2020 → esm2022}/maskedtextbox/parsing/stream.mjs +4 -2
- package/{esm2020 → esm2022}/maskedtextbox.module.mjs +7 -7
- package/{esm2020 → esm2022}/numerictextbox/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/numerictextbox/localization/localized-numerictextbox-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/numerictextbox/localization/messages.mjs +11 -3
- package/{esm2020 → esm2022}/numerictextbox/numerictextbox.component.mjs +367 -319
- package/{esm2020 → esm2022}/numerictextbox.module.mjs +7 -7
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/radiobutton/radiobutton.component.mjs +58 -51
- package/{esm2020 → esm2022}/radiobutton/radiobutton.directive.mjs +12 -10
- package/{esm2020 → esm2022}/radiobutton.module.mjs +4 -4
- package/{esm2020 → esm2022}/rangeslider/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/rangeslider/localization/localized-rangeslider-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/rangeslider/localization/messages.mjs +11 -3
- package/{esm2020 → esm2022}/rangeslider/rangeslider-model.mjs +2 -0
- package/{esm2020 → esm2022}/rangeslider/rangeslider.component.mjs +117 -101
- package/{esm2020 → esm2022}/rangeslider.module.mjs +4 -4
- package/{esm2020 → esm2022}/rating/directives/rating-hovered-item.directive.mjs +4 -3
- package/{esm2020 → esm2022}/rating/directives/rating-item.directive.mjs +4 -3
- package/{esm2020 → esm2022}/rating/directives/rating-selected-item.directive.mjs +4 -3
- package/{esm2020 → esm2022}/rating/rating.component.mjs +96 -76
- package/{esm2020 → esm2022}/rating.module.mjs +4 -4
- package/{esm2020 → esm2022}/shared/input-separator.component.mjs +10 -12
- package/{esm2020 → esm2022}/shared/shared-events.directive.mjs +13 -7
- package/{esm2020 → esm2022}/shared/textarea.directive.mjs +66 -52
- package/{esm2020 → esm2022}/signature/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/signature/localization/localized-signature-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/signature/localization/messages.mjs +19 -3
- package/{esm2020 → esm2022}/signature/signature.component.mjs +205 -151
- package/{esm2020 → esm2022}/signature.module.mjs +4 -4
- package/{esm2020 → esm2022}/slider/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/slider/localization/localized-slider-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/slider/localization/messages.mjs +15 -3
- package/{esm2020 → esm2022}/slider/slider-model.mjs +1 -0
- package/{esm2020 → esm2022}/slider/slider.component.mjs +121 -99
- package/{esm2020 → esm2022}/slider.module.mjs +4 -4
- package/{esm2020 → esm2022}/sliders-common/label-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/sliders-common/slider-base.mjs +112 -90
- package/{esm2020 → esm2022}/sliders-common/slider-model.base.mjs +6 -0
- package/{esm2020 → esm2022}/sliders-common/slider-ticks.component.mjs +19 -11
- package/{esm2020 → esm2022}/switch/events/blur-event.mjs +4 -0
- package/{esm2020 → esm2022}/switch/events/focus-event.mjs +4 -0
- package/{esm2020 → esm2022}/switch/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/switch/localization/localized-switch-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/switch/localization/messages.mjs +11 -3
- package/{esm2020 → esm2022}/switch/switch.component.mjs +125 -106
- package/{esm2020 → esm2022}/switch.module.mjs +4 -4
- package/esm2022/text-fields-common/text-fields-base.mjs +150 -0
- package/{esm2020 → esm2022}/textarea/textarea-prefix.component.mjs +12 -14
- package/{esm2020 → esm2022}/textarea/textarea-suffix.component.mjs +12 -14
- package/{esm2020 → esm2022}/textarea/textarea.component.mjs +173 -144
- package/{esm2020 → esm2022}/textarea.module.mjs +7 -7
- package/{esm2020 → esm2022}/textbox/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/textbox/localization/localized-textbox-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/textbox/localization/messages.mjs +7 -3
- package/{esm2020 → esm2022}/textbox/textbox-prefix.directive.mjs +8 -7
- package/{esm2020 → esm2022}/textbox/textbox-suffix.directive.mjs +8 -7
- package/{esm2020 → esm2022}/textbox/textbox.component.mjs +286 -204
- package/{esm2020 → esm2022}/textbox/textbox.directive.mjs +36 -33
- package/{esm2020 → esm2022}/textbox.module.mjs +7 -7
- package/{fesm2020 → fesm2022}/progress-kendo-angular-inputs.mjs +3718 -2910
- package/formfield/error.component.d.ts +1 -1
- package/formfield/formfield.component.d.ts +1 -1
- package/formfield/hint.component.d.ts +1 -1
- package/formfield/models/message-align.d.ts +1 -1
- package/formfield/models/orientation.d.ts +1 -1
- package/formfield/models/show-options.d.ts +1 -1
- package/index.d.ts +0 -1
- package/inputs.module.d.ts +1 -1
- package/maskedtextbox/maskedtextbox.component.d.ts +1 -1
- package/maskedtextbox.module.d.ts +1 -1
- package/numerictextbox/localization/messages.d.ts +1 -1
- package/numerictextbox/numerictextbox.component.d.ts +1 -1
- package/numerictextbox.module.d.ts +1 -1
- package/package.json +20 -26
- package/radiobutton/radiobutton.component.d.ts +1 -1
- package/radiobutton/radiobutton.directive.d.ts +1 -1
- package/rangeslider/localization/messages.d.ts +1 -1
- package/rangeslider/rangeslider-model.d.ts +0 -1
- package/rangeslider/rangeslider-value.type.d.ts +1 -1
- package/rangeslider/rangeslider.component.d.ts +1 -1
- package/rating/models/precision.d.ts +1 -1
- package/rating/models/selection.d.ts +1 -1
- package/rating/rating.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +1 -1
- package/shared/input-separator.component.d.ts +1 -1
- package/shared/shared-events.directive.d.ts +1 -1
- package/shared/textarea.directive.d.ts +1 -1
- package/signature/localization/messages.d.ts +1 -1
- package/signature/signature.component.d.ts +1 -1
- package/slider/localization/messages.d.ts +1 -1
- package/slider/slider-model.d.ts +0 -1
- package/slider/slider.component.d.ts +1 -1
- package/sliders-common/slider-base.d.ts +1 -1
- package/sliders-common/slider-ticks.component.d.ts +1 -1
- package/sliders-common/title-callback.d.ts +1 -1
- package/switch/localization/messages.d.ts +1 -1
- package/switch/switch.component.d.ts +1 -1
- package/text-fields-common/text-fields-base.d.ts +1 -1
- package/textarea/models/adornments-orientation.d.ts +1 -1
- package/textarea/models/flow.d.ts +1 -1
- package/textarea/models/resize.d.ts +1 -1
- package/textarea/textarea-prefix.component.d.ts +1 -1
- package/textarea/textarea-suffix.component.d.ts +1 -1
- package/textarea/textarea.component.d.ts +1 -1
- package/textarea.module.d.ts +1 -1
- package/textbox/localization/messages.d.ts +1 -1
- package/textbox/models/icon-show-options.d.ts +1 -1
- package/textbox/textbox-prefix.directive.d.ts +1 -1
- package/textbox/textbox-suffix.directive.d.ts +1 -1
- package/textbox/textbox.component.d.ts +1 -1
- package/textbox/textbox.directive.d.ts +1 -1
- package/textbox.module.d.ts +1 -1
- package/esm2020/colorpicker/localization/messages.mjs +0 -75
- package/esm2020/inputs.module.mjs +0 -96
- package/esm2020/shared.module.mjs +0 -32
- package/esm2020/text-fields-common/text-fields-base.mjs +0 -131
- package/fesm2015/progress-kendo-angular-inputs.mjs +0 -17268
- package/shared.module.d.ts +0 -19
- /package/{esm2020 → esm2022}/checkbox/checked-state.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/constants.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/events/close-event.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/events/kendo-drag-event.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/events/open-event.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/events.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/actions-layout.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/colorpicker-view.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/gradient-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/hsva.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/output-format.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/palette-presets.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/palette-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/popup-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/rgb.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/rgba.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/table-cell.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/tile-size.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/utils/color-parser.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/utils/contrast-curve.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/common/dom-utils.mjs +0 -0
- /package/{esm2020 → esm2022}/common/math.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/fillmode.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/rounded.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/size.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/styling-classes.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/type.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models.mjs +0 -0
- /package/{esm2020 → esm2022}/common/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/formfield/models/message-align.mjs +0 -0
- /package/{esm2020 → esm2022}/formfield/models/orientation.mjs +0 -0
- /package/{esm2020 → esm2022}/formfield/models/show-options.mjs +0 -0
- /package/{esm2020 → esm2022}/maskedtextbox/parsing/combinators.mjs +0 -0
- /package/{esm2020 → esm2022}/numerictextbox/arrow-direction.mjs +0 -0
- /package/{esm2020 → esm2022}/numerictextbox/constants.mjs +0 -0
- /package/{esm2020 → esm2022}/numerictextbox/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-inputs.mjs +0 -0
- /package/{esm2020 → esm2022}/rangeslider/rangeslider-value.type.mjs +0 -0
- /package/{esm2020 → esm2022}/rating/models/precision.mjs +0 -0
- /package/{esm2020 → esm2022}/rating/models/rating-item.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/rating/models/selection.mjs +0 -0
- /package/{esm2020 → esm2022}/shared/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/signature/events/close-event.mjs +0 -0
- /package/{esm2020 → esm2022}/signature/events/index.mjs +0 -0
- /package/{esm2020 → esm2022}/signature/events/open-event.mjs +0 -0
- /package/{esm2020 → esm2022}/signature/localization/index.mjs +0 -0
- /package/{esm2020 → esm2022}/sliders-common/sliders-util.mjs +0 -0
- /package/{esm2020 → esm2022}/sliders-common/title-callback.mjs +0 -0
- /package/{esm2020 → esm2022}/textarea/models/adornments-orientation.mjs +0 -0
- /package/{esm2020 → esm2022}/textarea/models/flow.mjs +0 -0
- /package/{esm2020 → esm2022}/textarea/models/resize.mjs +0 -0
- /package/{esm2020 → esm2022}/textbox/models/icon-show-options.mjs +0 -0
- /package/{esm2020 → esm2022}/validators/max.validator.mjs +0 -0
- /package/{esm2020 → esm2022}/validators/min.validator.mjs +0 -0
|
@@ -43,143 +43,14 @@ let nextColorPickerId = 0;
|
|
|
43
43
|
* which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
44
44
|
*/
|
|
45
45
|
export class ColorPickerComponent {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.hostClasses = true;
|
|
55
|
-
this.role = 'combobox';
|
|
56
|
-
this.hasPopup = 'dialog';
|
|
57
|
-
/**
|
|
58
|
-
* Specifies the views that will be rendered in the popup.
|
|
59
|
-
* By default both the gradient and palette views will be rendered.
|
|
60
|
-
*/
|
|
61
|
-
this.views = ['gradient', 'palette'];
|
|
62
|
-
/**
|
|
63
|
-
* Sets the read-only state of the ColorPicker.
|
|
64
|
-
*
|
|
65
|
-
* @default false
|
|
66
|
-
*/
|
|
67
|
-
this.readonly = false;
|
|
68
|
-
/**
|
|
69
|
-
* Sets the disabled state of the ColorPicker. To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_colorpicker#toc-managing-the-colorpicker-disabled-state-in-reactive-forms).
|
|
70
|
-
*
|
|
71
|
-
* @default false
|
|
72
|
-
*/
|
|
73
|
-
this.disabled = false;
|
|
74
|
-
/**
|
|
75
|
-
* Specifies the output format of the ColorPicker.
|
|
76
|
-
*
|
|
77
|
-
* If the input value is in a different format, it will be parsed into the specified output `format`.
|
|
78
|
-
*
|
|
79
|
-
* The supported values are:
|
|
80
|
-
* * `rgba` (default)
|
|
81
|
-
* * `hex`
|
|
82
|
-
*/
|
|
83
|
-
this.format = 'rgba';
|
|
84
|
-
/**
|
|
85
|
-
* Specifies whether the ColorPicker should display a 'Clear color' button.
|
|
86
|
-
*
|
|
87
|
-
* @default true
|
|
88
|
-
*/
|
|
89
|
-
this.clearButton = true;
|
|
90
|
-
/**
|
|
91
|
-
* Displays `Apply` and `Cancel` action buttons and color preview panes.
|
|
92
|
-
*
|
|
93
|
-
* When enabled, the component value will not change immediately upon
|
|
94
|
-
* color selection, but only after the `Apply` button is clicked.
|
|
95
|
-
*
|
|
96
|
-
* The `Cancel` button reverts the current selection to its
|
|
97
|
-
* previous state i.e. to the current value.
|
|
98
|
-
*
|
|
99
|
-
* @default false
|
|
100
|
-
*/
|
|
101
|
-
this.preview = false;
|
|
102
|
-
/**
|
|
103
|
-
* Configures the layout of the `Apply` and `Cancel` action buttons.
|
|
104
|
-
*
|
|
105
|
-
* The possible values are:
|
|
106
|
-
* * `start`
|
|
107
|
-
* * `center`
|
|
108
|
-
* * `end` (default)
|
|
109
|
-
* * `stretch`
|
|
110
|
-
*/
|
|
111
|
-
this.actionsLayout = 'end';
|
|
112
|
-
/**
|
|
113
|
-
* Fires each time the value is changed.
|
|
114
|
-
*/
|
|
115
|
-
this.valueChange = new EventEmitter();
|
|
116
|
-
/**
|
|
117
|
-
* Fires each time the popup is about to open.
|
|
118
|
-
* This event is preventable. If you cancel it, the popup will remain closed.
|
|
119
|
-
*/
|
|
120
|
-
this.open = new EventEmitter();
|
|
121
|
-
/**
|
|
122
|
-
* Fires each time the popup is about to close.
|
|
123
|
-
* This event is preventable. If you cancel it, the popup will remain open.
|
|
124
|
-
*/
|
|
125
|
-
this.close = new EventEmitter();
|
|
126
|
-
/**
|
|
127
|
-
* Fires each time ColorPicker is focused.
|
|
128
|
-
*/
|
|
129
|
-
this.onFocus = new EventEmitter();
|
|
130
|
-
/**
|
|
131
|
-
* Fires each time the ColorPicker is blurred.
|
|
132
|
-
*/
|
|
133
|
-
this.onBlur = new EventEmitter();
|
|
134
|
-
/**
|
|
135
|
-
* Fires when the user cancels the current color selection.
|
|
136
|
-
*
|
|
137
|
-
* Fires on preview pane or 'Cancel' button click.
|
|
138
|
-
*/
|
|
139
|
-
this.cancel = new EventEmitter();
|
|
140
|
-
/**
|
|
141
|
-
* Fires each time the left side of the ColorPicker wrapper is clicked.
|
|
142
|
-
* The event is triggered regardless of whether a ColorPicker icon is set or not.
|
|
143
|
-
*
|
|
144
|
-
* The [ActiveColorClickEvent]({% slug api_inputs_activecolorclickevent %}) event provides the option to prevent the popup opening.
|
|
145
|
-
*/
|
|
146
|
-
this.activeColorClick = new EventEmitter();
|
|
147
|
-
/**
|
|
148
|
-
* @hidden
|
|
149
|
-
* Fires each time the clear button is clicked.
|
|
150
|
-
*/
|
|
151
|
-
this.clearButtonClick = new EventEmitter();
|
|
152
|
-
/**
|
|
153
|
-
* Fires each time the view is about to change.
|
|
154
|
-
* Used to provide a two-way binding for the `activeView` property.
|
|
155
|
-
*/
|
|
156
|
-
this.activeViewChange = new EventEmitter();
|
|
157
|
-
/**
|
|
158
|
-
* Indicates whether the ColorPicker wrapper is focused.
|
|
159
|
-
*/
|
|
160
|
-
this.isFocused = false;
|
|
161
|
-
/**
|
|
162
|
-
* @hidden
|
|
163
|
-
*/
|
|
164
|
-
this.arrowDownIcon = caretAltDownIcon;
|
|
165
|
-
this._tabindex = 0;
|
|
166
|
-
this._popupSettings = { animate: true };
|
|
167
|
-
this._paletteSettings = {};
|
|
168
|
-
this._gradientSettings = { opacity: true, delay: 0 };
|
|
169
|
-
this._size = 'medium';
|
|
170
|
-
this._rounded = 'medium';
|
|
171
|
-
this._fillMode = 'solid';
|
|
172
|
-
this.subscriptions = new Subscription();
|
|
173
|
-
this.popupSubs = new Subscription();
|
|
174
|
-
this.notifyNgTouched = () => { };
|
|
175
|
-
this.notifyNgChanged = () => { };
|
|
176
|
-
this.domFocusListener = (event) => event.stopImmediatePropagation();
|
|
177
|
-
validatePackage(packageMetadata);
|
|
178
|
-
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
179
|
-
this.direction = rtl ? 'rtl' : 'ltr';
|
|
180
|
-
});
|
|
181
|
-
this.colorPickerId = nextColorPickerId++;
|
|
182
|
-
}
|
|
46
|
+
host;
|
|
47
|
+
popupService;
|
|
48
|
+
cdr;
|
|
49
|
+
localizationService;
|
|
50
|
+
ngZone;
|
|
51
|
+
renderer;
|
|
52
|
+
injector;
|
|
53
|
+
hostClasses = true;
|
|
183
54
|
get focusedClass() {
|
|
184
55
|
return this.isFocused;
|
|
185
56
|
}
|
|
@@ -195,9 +66,21 @@ export class ColorPickerComponent {
|
|
|
195
66
|
get hostTabindex() {
|
|
196
67
|
return this.tabindex;
|
|
197
68
|
}
|
|
69
|
+
direction;
|
|
70
|
+
role = 'combobox';
|
|
71
|
+
hasPopup = 'dialog';
|
|
198
72
|
get isControlInvalid() {
|
|
199
73
|
return (this.control?.invalid)?.toString();
|
|
200
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* @hidden
|
|
77
|
+
*/
|
|
78
|
+
focusableId;
|
|
79
|
+
/**
|
|
80
|
+
* Specifies the views that will be rendered in the popup.
|
|
81
|
+
* By default both the gradient and palette views will be rendered.
|
|
82
|
+
*/
|
|
83
|
+
views = ['gradient', 'palette'];
|
|
201
84
|
/**
|
|
202
85
|
* @hidden
|
|
203
86
|
*/
|
|
@@ -207,6 +90,36 @@ export class ColorPickerComponent {
|
|
|
207
90
|
get view() {
|
|
208
91
|
return (this.views && this.views.length > 0) ? this.views[0] : null;
|
|
209
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Sets the initially active view in the popup. The property supports two-way binding.
|
|
95
|
+
*
|
|
96
|
+
* The supported values are:
|
|
97
|
+
* * `gradient`
|
|
98
|
+
* * `palette`
|
|
99
|
+
*/
|
|
100
|
+
activeView;
|
|
101
|
+
/**
|
|
102
|
+
* Sets the read-only state of the ColorPicker.
|
|
103
|
+
*
|
|
104
|
+
* @default false
|
|
105
|
+
*/
|
|
106
|
+
readonly = false;
|
|
107
|
+
/**
|
|
108
|
+
* Sets the disabled state of the ColorPicker. To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_colorpicker#toc-managing-the-colorpicker-disabled-state-in-reactive-forms).
|
|
109
|
+
*
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
disabled = false;
|
|
113
|
+
/**
|
|
114
|
+
* Specifies the output format of the ColorPicker.
|
|
115
|
+
*
|
|
116
|
+
* If the input value is in a different format, it will be parsed into the specified output `format`.
|
|
117
|
+
*
|
|
118
|
+
* The supported values are:
|
|
119
|
+
* * `rgba` (default)
|
|
120
|
+
* * `hex`
|
|
121
|
+
*/
|
|
122
|
+
format = 'rgba';
|
|
210
123
|
/**
|
|
211
124
|
* Specifies the value of the initially selected color.
|
|
212
125
|
*/
|
|
@@ -243,6 +156,20 @@ export class ColorPickerComponent {
|
|
|
243
156
|
get gradientSettings() {
|
|
244
157
|
return this._gradientSettings;
|
|
245
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Defines the name of an [existing icon in the Kendo UI theme]({% slug icons %}).
|
|
161
|
+
* Provide only the name of the icon without the `k-icon` or the `k-i-` prefixes.
|
|
162
|
+
*
|
|
163
|
+
* For example, `pencil-tools` will be parsed to `k-icon k-i-pencil-tools`.
|
|
164
|
+
*/
|
|
165
|
+
icon;
|
|
166
|
+
/**
|
|
167
|
+
* A CSS class name which displays an icon in the ColorPicker button.
|
|
168
|
+
* `iconClass` is compatible with the `ngClass` syntax.
|
|
169
|
+
*
|
|
170
|
+
* Takes precedence over `icon` if both are defined.
|
|
171
|
+
*/
|
|
172
|
+
iconClass;
|
|
246
173
|
/**
|
|
247
174
|
* Defines an SVGIcon to be rendered within the button.
|
|
248
175
|
* The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
@@ -256,6 +183,12 @@ export class ColorPickerComponent {
|
|
|
256
183
|
get svgIcon() {
|
|
257
184
|
return this._svgIcon;
|
|
258
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Specifies whether the ColorPicker should display a 'Clear color' button.
|
|
188
|
+
*
|
|
189
|
+
* @default true
|
|
190
|
+
*/
|
|
191
|
+
clearButton = true;
|
|
259
192
|
/**
|
|
260
193
|
* Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
261
194
|
*
|
|
@@ -269,6 +202,28 @@ export class ColorPickerComponent {
|
|
|
269
202
|
get tabindex() {
|
|
270
203
|
return !this.disabled ? this._tabindex : undefined;
|
|
271
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Displays `Apply` and `Cancel` action buttons and color preview panes.
|
|
207
|
+
*
|
|
208
|
+
* When enabled, the component value will not change immediately upon
|
|
209
|
+
* color selection, but only after the `Apply` button is clicked.
|
|
210
|
+
*
|
|
211
|
+
* The `Cancel` button reverts the current selection to its
|
|
212
|
+
* previous state i.e. to the current value.
|
|
213
|
+
*
|
|
214
|
+
* @default false
|
|
215
|
+
*/
|
|
216
|
+
preview = false;
|
|
217
|
+
/**
|
|
218
|
+
* Configures the layout of the `Apply` and `Cancel` action buttons.
|
|
219
|
+
*
|
|
220
|
+
* The possible values are:
|
|
221
|
+
* * `start`
|
|
222
|
+
* * `center`
|
|
223
|
+
* * `end` (default)
|
|
224
|
+
* * `stretch`
|
|
225
|
+
*/
|
|
226
|
+
actionsLayout = 'end';
|
|
272
227
|
/**
|
|
273
228
|
* The size property specifies the padding of the ColorPicker internal elements
|
|
274
229
|
* ([see example]({% slug appearance_colorpicker %}#toc-size)).
|
|
@@ -324,6 +279,55 @@ export class ColorPickerComponent {
|
|
|
324
279
|
get fillMode() {
|
|
325
280
|
return this._fillMode;
|
|
326
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Fires each time the value is changed.
|
|
284
|
+
*/
|
|
285
|
+
valueChange = new EventEmitter();
|
|
286
|
+
/**
|
|
287
|
+
* Fires each time the popup is about to open.
|
|
288
|
+
* This event is preventable. If you cancel it, the popup will remain closed.
|
|
289
|
+
*/
|
|
290
|
+
open = new EventEmitter();
|
|
291
|
+
/**
|
|
292
|
+
* Fires each time the popup is about to close.
|
|
293
|
+
* This event is preventable. If you cancel it, the popup will remain open.
|
|
294
|
+
*/
|
|
295
|
+
close = new EventEmitter();
|
|
296
|
+
/**
|
|
297
|
+
* Fires each time ColorPicker is focused.
|
|
298
|
+
*/
|
|
299
|
+
onFocus = new EventEmitter();
|
|
300
|
+
/**
|
|
301
|
+
* Fires each time the ColorPicker is blurred.
|
|
302
|
+
*/
|
|
303
|
+
onBlur = new EventEmitter();
|
|
304
|
+
/**
|
|
305
|
+
* Fires when the user cancels the current color selection.
|
|
306
|
+
*
|
|
307
|
+
* Fires on preview pane or 'Cancel' button click.
|
|
308
|
+
*/
|
|
309
|
+
cancel = new EventEmitter();
|
|
310
|
+
/**
|
|
311
|
+
* Fires each time the left side of the ColorPicker wrapper is clicked.
|
|
312
|
+
* The event is triggered regardless of whether a ColorPicker icon is set or not.
|
|
313
|
+
*
|
|
314
|
+
* The [ActiveColorClickEvent]({% slug api_inputs_activecolorclickevent %}) event provides the option to prevent the popup opening.
|
|
315
|
+
*/
|
|
316
|
+
activeColorClick = new EventEmitter();
|
|
317
|
+
/**
|
|
318
|
+
* @hidden
|
|
319
|
+
* Fires each time the clear button is clicked.
|
|
320
|
+
*/
|
|
321
|
+
clearButtonClick = new EventEmitter();
|
|
322
|
+
/**
|
|
323
|
+
* Fires each time the view is about to change.
|
|
324
|
+
* Used to provide a two-way binding for the `activeView` property.
|
|
325
|
+
*/
|
|
326
|
+
activeViewChange = new EventEmitter();
|
|
327
|
+
/**
|
|
328
|
+
* Indicates whether the ColorPicker wrapper is focused.
|
|
329
|
+
*/
|
|
330
|
+
isFocused = false;
|
|
327
331
|
/**
|
|
328
332
|
* Indicates whether the ColorPicker popup is open.
|
|
329
333
|
*/
|
|
@@ -352,6 +356,48 @@ export class ColorPickerComponent {
|
|
|
352
356
|
}
|
|
353
357
|
return '';
|
|
354
358
|
}
|
|
359
|
+
/**
|
|
360
|
+
* Provides a reference to a container element inside the component markup.
|
|
361
|
+
* The container element references the location of the appended popup—
|
|
362
|
+
* for example, inside the component markup.
|
|
363
|
+
*/
|
|
364
|
+
container;
|
|
365
|
+
activeColor;
|
|
366
|
+
popupTemplate;
|
|
367
|
+
flatColorPicker;
|
|
368
|
+
/**
|
|
369
|
+
* @hidden
|
|
370
|
+
*/
|
|
371
|
+
arrowDownIcon = caretAltDownIcon;
|
|
372
|
+
popupRef;
|
|
373
|
+
_svgIcon;
|
|
374
|
+
_value;
|
|
375
|
+
_tabindex = 0;
|
|
376
|
+
_popupSettings = { animate: true };
|
|
377
|
+
_paletteSettings = {};
|
|
378
|
+
_gradientSettings = { opacity: true, delay: 0 };
|
|
379
|
+
_size = 'medium';
|
|
380
|
+
_rounded = 'medium';
|
|
381
|
+
_fillMode = 'solid';
|
|
382
|
+
dynamicRTLSubscription;
|
|
383
|
+
subscriptions = new Subscription();
|
|
384
|
+
popupSubs = new Subscription();
|
|
385
|
+
colorPickerId;
|
|
386
|
+
control;
|
|
387
|
+
constructor(host, popupService, cdr, localizationService, ngZone, renderer, injector) {
|
|
388
|
+
this.host = host;
|
|
389
|
+
this.popupService = popupService;
|
|
390
|
+
this.cdr = cdr;
|
|
391
|
+
this.localizationService = localizationService;
|
|
392
|
+
this.ngZone = ngZone;
|
|
393
|
+
this.renderer = renderer;
|
|
394
|
+
this.injector = injector;
|
|
395
|
+
validatePackage(packageMetadata);
|
|
396
|
+
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
397
|
+
this.direction = rtl ? 'rtl' : 'ltr';
|
|
398
|
+
});
|
|
399
|
+
this.colorPickerId = nextColorPickerId++;
|
|
400
|
+
}
|
|
355
401
|
ngOnInit() {
|
|
356
402
|
const defaultPreset = (this.format !== 'name') ? DEFAULT_PRESET : DEFAULT_ACCESSIBLE_PRESET;
|
|
357
403
|
const settingsPalette = this._paletteSettings.palette;
|
|
@@ -682,6 +728,8 @@ export class ColorPickerComponent {
|
|
|
682
728
|
}
|
|
683
729
|
return this.gradientSettings.opacity ? inputs.opacityInput.numericInput : inputs.blueInput.numericInput;
|
|
684
730
|
}
|
|
731
|
+
notifyNgTouched = () => { };
|
|
732
|
+
notifyNgChanged = () => { };
|
|
685
733
|
handleDomEvents(action, events) {
|
|
686
734
|
const hostElement = this.host.nativeElement;
|
|
687
735
|
events.forEach(ev => hostElement[`${action}EventListener`](ev, this.domFocusListener, true));
|
|
@@ -715,6 +763,7 @@ export class ColorPickerComponent {
|
|
|
715
763
|
}));
|
|
716
764
|
});
|
|
717
765
|
}
|
|
766
|
+
domFocusListener = (event) => event.stopImmediatePropagation();
|
|
718
767
|
handleHostId() {
|
|
719
768
|
const hostElement = this.host.nativeElement;
|
|
720
769
|
const existingId = hostElement.getAttribute('id');
|
|
@@ -727,26 +776,25 @@ export class ColorPickerComponent {
|
|
|
727
776
|
this.focusableId = id;
|
|
728
777
|
}
|
|
729
778
|
}
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
}
|
|
749
|
-
], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "activeColor", first: true, predicate: ["activeColor"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "flatColorPicker", first: true, predicate: ["flatColorPicker"], descendants: true }], exportAs: ["kendoColorPicker"], usesOnChanges: true, ngImport: i0, template: `
|
|
779
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerComponent, deps: [{ token: i0.ElementRef }, { token: i1.PopupService }, { token: i0.ChangeDetectorRef }, { token: i2.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
780
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColorPickerComponent, isStandalone: true, selector: "kendo-colorpicker", inputs: { views: "views", view: "view", activeView: "activeView", readonly: "readonly", disabled: "disabled", format: "format", value: "value", popupSettings: "popupSettings", paletteSettings: "paletteSettings", gradientSettings: "gradientSettings", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon", clearButton: "clearButton", tabindex: "tabindex", preview: "preview", actionsLayout: "actionsLayout", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur", cancel: "cancel", activeColorClick: "activeColorClick", clearButtonClick: "clearButtonClick", activeViewChange: "activeViewChange" }, host: { properties: { "class.k-colorpicker": "this.hostClasses", "class.k-icon-picker": "this.hostClasses", "class.k-picker": "this.hostClasses", "class.k-focus": "this.focusedClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "attr.aria-readonly": "this.ariaReadonly", "attr.aria-expanded": "this.ariaExpanded", "attr.tabindex": "this.hostTabindex", "attr.dir": "this.direction", "attr.role": "this.role", "attr.aria-haspopup": "this.hasPopup", "attr.aria-invalid": "this.isControlInvalid", "class.k-readonly": "this.readonly" } }, providers: [{
|
|
781
|
+
multi: true,
|
|
782
|
+
provide: NG_VALUE_ACCESSOR,
|
|
783
|
+
useExisting: forwardRef(() => ColorPickerComponent)
|
|
784
|
+
}, {
|
|
785
|
+
provide: KendoInput,
|
|
786
|
+
useExisting: forwardRef(() => ColorPickerComponent)
|
|
787
|
+
},
|
|
788
|
+
ColorPickerLocalizationService,
|
|
789
|
+
{
|
|
790
|
+
provide: LocalizationService,
|
|
791
|
+
useExisting: ColorPickerLocalizationService
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
provide: L10N_PREFIX,
|
|
795
|
+
useValue: 'kendo.colorpicker'
|
|
796
|
+
}
|
|
797
|
+
], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "activeColor", first: true, predicate: ["activeColor"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "flatColorPicker", first: true, predicate: ["flatColorPicker"], descendants: true }], exportAs: ["kendoColorPicker"], usesOnChanges: true, ngImport: i0, template: `
|
|
750
798
|
<ng-container kendoColorPickerLocalizedMessages
|
|
751
799
|
i18n-colorPickerNoColor="kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty."
|
|
752
800
|
colorPickerNoColor="Colorpicker no color chosen"
|
|
@@ -820,6 +868,8 @@ ColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
820
868
|
type="button"
|
|
821
869
|
icon="caret-alt-down"
|
|
822
870
|
[svgIcon]="arrowDownIcon"
|
|
871
|
+
[fillMode]="fillMode"
|
|
872
|
+
rounded="none"
|
|
823
873
|
aria-hidden="true"
|
|
824
874
|
class="k-input-button"
|
|
825
875
|
>
|
|
@@ -847,7 +897,8 @@ ColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
847
897
|
</ng-template>
|
|
848
898
|
<ng-container #container></ng-container>
|
|
849
899
|
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedColorPickerMessagesDirective, selector: "[kendoColorPickerLocalizedMessages], [kendoFlatColorPickerLocalizedMessages], [kendoColorGradientLocalizedMessages], [kendoColorPaletteLocalizedMessages]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { 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: FlatColorPickerComponent, selector: "kendo-flatcolorpicker", inputs: ["readonly", "disabled", "format", "value", "tabindex", "clearButton", "preview", "actionsLayout", "activeView", "views", "gradientSettings", "paletteSettings"], outputs: ["valueChange", "cancel", "activeViewChange", "clearButtonClick", "actionButtonClick"], exportAs: ["kendoFlatColorPicker"] }] });
|
|
850
|
-
|
|
900
|
+
}
|
|
901
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerComponent, decorators: [{
|
|
851
902
|
type: Component,
|
|
852
903
|
args: [{
|
|
853
904
|
exportAs: 'kendoColorPicker',
|
|
@@ -943,6 +994,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
943
994
|
type="button"
|
|
944
995
|
icon="caret-alt-down"
|
|
945
996
|
[svgIcon]="arrowDownIcon"
|
|
997
|
+
[fillMode]="fillMode"
|
|
998
|
+
rounded="none"
|
|
946
999
|
aria-hidden="true"
|
|
947
1000
|
class="k-input-button"
|
|
948
1001
|
>
|
|
@@ -14,10 +14,14 @@ import * as i1 from "@progress/kendo-angular-l10n";
|
|
|
14
14
|
* @hidden
|
|
15
15
|
*/
|
|
16
16
|
export class ContrastValidationComponent {
|
|
17
|
+
localization;
|
|
18
|
+
type;
|
|
19
|
+
pass;
|
|
20
|
+
value;
|
|
21
|
+
checkIcon = checkIcon;
|
|
22
|
+
xCircleIcon = xCircleIcon;
|
|
17
23
|
constructor(localization) {
|
|
18
24
|
this.localization = localization;
|
|
19
|
-
this.checkIcon = checkIcon;
|
|
20
|
-
this.xCircleIcon = xCircleIcon;
|
|
21
25
|
}
|
|
22
26
|
get passMessage() {
|
|
23
27
|
return this.localization.get('passContrast');
|
|
@@ -29,9 +33,8 @@ export class ContrastValidationComponent {
|
|
|
29
33
|
const ratio = this.type === 'AA' ? AA_RATIO : AAA_RATIO;
|
|
30
34
|
return `${this.type}: ${ratio.toFixed(1)}`;
|
|
31
35
|
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
ContrastValidationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ContrastValidationComponent, isStandalone: true, selector: "[kendoContrastValidation]", inputs: { type: "type", pass: "pass", value: "value" }, ngImport: i0, template: `
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContrastValidationComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
37
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContrastValidationComponent, isStandalone: true, selector: "[kendoContrastValidation]", inputs: { type: "type", pass: "pass", value: "value" }, ngImport: i0, template: `
|
|
35
38
|
<span>{{contrastText}}</span>
|
|
36
39
|
<ng-container *ngIf="value">
|
|
37
40
|
<span class="k-contrast-validation k-text-success" *ngIf="pass">
|
|
@@ -44,7 +47,8 @@ ContrastValidationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
|
|
|
44
47
|
</span>
|
|
45
48
|
</ng-container>
|
|
46
49
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
47
|
-
|
|
50
|
+
}
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContrastValidationComponent, decorators: [{
|
|
48
52
|
type: Component,
|
|
49
53
|
args: [{
|
|
50
54
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
@@ -16,10 +16,13 @@ import * as i1 from "@progress/kendo-angular-l10n";
|
|
|
16
16
|
* @hidden
|
|
17
17
|
*/
|
|
18
18
|
export class ContrastComponent {
|
|
19
|
+
localization;
|
|
20
|
+
value;
|
|
21
|
+
ratio;
|
|
22
|
+
checkIcon = checkIcon;
|
|
23
|
+
xCircleIcon = xCircleIcon;
|
|
19
24
|
constructor(localization) {
|
|
20
25
|
this.localization = localization;
|
|
21
|
-
this.checkIcon = checkIcon;
|
|
22
|
-
this.xCircleIcon = xCircleIcon;
|
|
23
26
|
}
|
|
24
27
|
get formatedRatio() {
|
|
25
28
|
return this.contrastRatio.toFixed(2);
|
|
@@ -37,9 +40,8 @@ export class ContrastComponent {
|
|
|
37
40
|
const contrast = getContrastFromTwoRGBAs(getRGBA(this.value), getRGBA(this.ratio));
|
|
38
41
|
return contrast;
|
|
39
42
|
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
ContrastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ContrastComponent, isStandalone: true, selector: "[kendoContrastTool]", inputs: { value: "value", ratio: "ratio" }, ngImport: i0, template: `
|
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContrastComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContrastComponent, isStandalone: true, selector: "[kendoContrastTool]", inputs: { value: "value", ratio: "ratio" }, ngImport: i0, template: `
|
|
43
45
|
<div class="k-contrast-ratio">
|
|
44
46
|
<span class="k-contrast-ratio-text">{{contrastRatioText}}</span>
|
|
45
47
|
<ng-container *ngIf="value">
|
|
@@ -63,7 +65,8 @@ ContrastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
63
65
|
[pass]="satisfiesAAACondition">
|
|
64
66
|
</div>
|
|
65
67
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ContrastValidationComponent, selector: "[kendoContrastValidation]", inputs: ["type", "pass", "value"] }] });
|
|
66
|
-
|
|
68
|
+
}
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContrastComponent, decorators: [{
|
|
67
70
|
type: Component,
|
|
68
71
|
args: [{
|
|
69
72
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
@@ -33,13 +33,14 @@
|
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
35
|
export class ActiveColorClickEvent {
|
|
36
|
+
color;
|
|
37
|
+
openPrevented = false;
|
|
36
38
|
/**
|
|
37
39
|
* @hidden
|
|
38
40
|
* @param color Represents the current value of the ColorPicker.
|
|
39
41
|
*/
|
|
40
42
|
constructor(color) {
|
|
41
43
|
this.color = color;
|
|
42
|
-
this.openPrevented = false;
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
46
|
* Prevents the opening of the popup.
|
|
@@ -7,6 +7,10 @@ import { PreventableEvent } from "@progress/kendo-angular-common";
|
|
|
7
7
|
* Arguments for the `cancel` event of the ColorPicker and FlatColorPicker components.
|
|
8
8
|
*/
|
|
9
9
|
export class ColorPickerCancelEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* The DOM event that triggered the `cancel` event.
|
|
12
|
+
*/
|
|
13
|
+
originalEvent;
|
|
10
14
|
constructor(originalEvent) {
|
|
11
15
|
super();
|
|
12
16
|
this.originalEvent = originalEvent;
|
|
@@ -10,12 +10,15 @@ import * as i1 from "@progress/kendo-angular-l10n";
|
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
12
|
export class FlatColorPickerActionButtonsComponent {
|
|
13
|
+
localizationService;
|
|
14
|
+
hostClasses = true;
|
|
15
|
+
innerTabIndex = -1;
|
|
16
|
+
actionButtonClick = new EventEmitter();
|
|
17
|
+
tabOut = new EventEmitter();
|
|
18
|
+
firstButton;
|
|
19
|
+
lastButton;
|
|
13
20
|
constructor(localizationService) {
|
|
14
21
|
this.localizationService = localizationService;
|
|
15
|
-
this.hostClasses = true;
|
|
16
|
-
this.innerTabIndex = -1;
|
|
17
|
-
this.actionButtonClick = new EventEmitter();
|
|
18
|
-
this.tabOut = new EventEmitter();
|
|
19
22
|
}
|
|
20
23
|
getText(text) {
|
|
21
24
|
return this.localizationService.get(text);
|
|
@@ -27,9 +30,8 @@ export class FlatColorPickerActionButtonsComponent {
|
|
|
27
30
|
};
|
|
28
31
|
this.actionButtonClick.emit(args);
|
|
29
32
|
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
FlatColorPickerActionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FlatColorPickerActionButtonsComponent, isStandalone: true, selector: "[kendoFlatColorPickerActionButtons]", inputs: { innerTabIndex: "innerTabIndex" }, outputs: { actionButtonClick: "actionButtonClick", tabOut: "tabOut" }, host: { properties: { "class.k-coloreditor-footer": "this.hostClasses", "class.k-actions": "this.hostClasses", "class.k-actions-horizontal": "this.hostClasses" } }, viewQueries: [{ propertyName: "firstButton", first: true, predicate: ["first"], descendants: true, read: ElementRef }, { propertyName: "lastButton", first: true, predicate: ["last"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatColorPickerActionButtonsComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FlatColorPickerActionButtonsComponent, isStandalone: true, selector: "[kendoFlatColorPickerActionButtons]", inputs: { innerTabIndex: "innerTabIndex" }, outputs: { actionButtonClick: "actionButtonClick", tabOut: "tabOut" }, host: { properties: { "class.k-coloreditor-footer": "this.hostClasses", "class.k-actions": "this.hostClasses", "class.k-actions-horizontal": "this.hostClasses" } }, viewQueries: [{ propertyName: "firstButton", first: true, predicate: ["first"], descendants: true, read: ElementRef }, { propertyName: "lastButton", first: true, predicate: ["last"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
33
35
|
<button #first
|
|
34
36
|
class="k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base"
|
|
35
37
|
[attr.title]="getText('cancelButton')"
|
|
@@ -46,7 +48,8 @@ FlatColorPickerActionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVer
|
|
|
46
48
|
(keydown.tab)="$event.preventDefault(); tabOut.emit();"
|
|
47
49
|
>{{getText('applyButton')}}</button>
|
|
48
50
|
`, isInline: true });
|
|
49
|
-
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatColorPickerActionButtonsComponent, decorators: [{
|
|
50
53
|
type: Component,
|
|
51
54
|
args: [{
|
|
52
55
|
// eslint-disable-next-line @angular-eslint/component-selector
|