@progress/kendo-angular-inputs 21.4.1 → 22.0.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/colorpicker/localization/messages.d.ts +1 -1
  2. package/common/radio-checkbox.base.d.ts +1 -1
  3. package/fesm2022/progress-kendo-angular-inputs.mjs +321 -321
  4. package/numerictextbox/localization/messages.d.ts +1 -1
  5. package/otpinput/localization/messages.d.ts +1 -1
  6. package/package.json +17 -25
  7. package/rangeslider/localization/messages.d.ts +1 -1
  8. package/signature/localization/messages.d.ts +1 -1
  9. package/slider/localization/messages.d.ts +1 -1
  10. package/sliders-common/slider-base.d.ts +1 -1
  11. package/switch/localization/messages.d.ts +1 -1
  12. package/text-fields-common/text-fields-base.d.ts +1 -1
  13. package/textbox/localization/messages.d.ts +1 -1
  14. package/esm2022/checkbox/checkbox.component.mjs +0 -227
  15. package/esm2022/checkbox/checkbox.directive.mjs +0 -96
  16. package/esm2022/checkbox/checked-state.mjs +0 -5
  17. package/esm2022/checkbox.module.mjs +0 -42
  18. package/esm2022/colorpicker/adaptiveness/adaptive-close-button.component.mjs +0 -62
  19. package/esm2022/colorpicker/adaptiveness/adaptive-renderer.component.mjs +0 -219
  20. package/esm2022/colorpicker/color-contrast-svg.component.mjs +0 -108
  21. package/esm2022/colorpicker/color-gradient-numeric-label.directive.mjs +0 -37
  22. package/esm2022/colorpicker/color-gradient-text-label.directive.mjs +0 -34
  23. package/esm2022/colorpicker/color-gradient.component.mjs +0 -1110
  24. package/esm2022/colorpicker/color-input.component.mjs +0 -498
  25. package/esm2022/colorpicker/color-palette.component.mjs +0 -629
  26. package/esm2022/colorpicker/colorpicker.component.mjs +0 -1315
  27. package/esm2022/colorpicker/constants.mjs +0 -40
  28. package/esm2022/colorpicker/contrast-validation.component.mjs +0 -83
  29. package/esm2022/colorpicker/contrast.component.mjs +0 -114
  30. package/esm2022/colorpicker/events/active-color-click-event.mjs +0 -55
  31. package/esm2022/colorpicker/events/cancel-event.mjs +0 -18
  32. package/esm2022/colorpicker/events/close-event.mjs +0 -10
  33. package/esm2022/colorpicker/events/kendo-drag-event.mjs +0 -5
  34. package/esm2022/colorpicker/events/open-event.mjs +0 -10
  35. package/esm2022/colorpicker/events.mjs +0 -8
  36. package/esm2022/colorpicker/flatcolorpicker-actions.component.mjs +0 -112
  37. package/esm2022/colorpicker/flatcolorpicker-header.component.mjs +0 -244
  38. package/esm2022/colorpicker/flatcolorpicker.component.mjs +0 -942
  39. package/esm2022/colorpicker/localization/colorgradient-localization.service.mjs +0 -46
  40. package/esm2022/colorpicker/localization/colorpalette-localization.service.mjs +0 -46
  41. package/esm2022/colorpicker/localization/colorpicker-localization.service.mjs +0 -31
  42. package/esm2022/colorpicker/localization/custom-messages.component.mjs +0 -51
  43. package/esm2022/colorpicker/localization/flatcolorpicker-localization.service.mjs +0 -46
  44. package/esm2022/colorpicker/localization/localized-colorpicker-messages.directive.mjs +0 -39
  45. package/esm2022/colorpicker/localization/messages.mjs +0 -201
  46. package/esm2022/colorpicker/models/actions-layout.mjs +0 -5
  47. package/esm2022/colorpicker/models/adaptive-mode.mjs +0 -8
  48. package/esm2022/colorpicker/models/colorpicker-view.mjs +0 -5
  49. package/esm2022/colorpicker/models/gradient-settings.mjs +0 -5
  50. package/esm2022/colorpicker/models/hsva.mjs +0 -5
  51. package/esm2022/colorpicker/models/output-format.mjs +0 -5
  52. package/esm2022/colorpicker/models/palette-presets.mjs +0 -62
  53. package/esm2022/colorpicker/models/palette-settings.mjs +0 -5
  54. package/esm2022/colorpicker/models/popup-settings.mjs +0 -5
  55. package/esm2022/colorpicker/models/rgb.mjs +0 -5
  56. package/esm2022/colorpicker/models/rgba.mjs +0 -5
  57. package/esm2022/colorpicker/models/table-cell.mjs +0 -5
  58. package/esm2022/colorpicker/models/tile-size.mjs +0 -5
  59. package/esm2022/colorpicker/models.mjs +0 -16
  60. package/esm2022/colorpicker/services/color-palette.service.mjs +0 -65
  61. package/esm2022/colorpicker/services/flatcolorpicker.service.mjs +0 -39
  62. package/esm2022/colorpicker/utils/color-parser.mjs +0 -164
  63. package/esm2022/colorpicker/utils/contrast-curve.mjs +0 -85
  64. package/esm2022/colorpicker/utils.mjs +0 -6
  65. package/esm2022/colorpicker.module.mjs +0 -50
  66. package/esm2022/common/dom-utils.mjs +0 -36
  67. package/esm2022/common/formservice.service.mjs +0 -21
  68. package/esm2022/common/math.mjs +0 -65
  69. package/esm2022/common/models/fillmode.mjs +0 -5
  70. package/esm2022/common/models/gutters.mjs +0 -5
  71. package/esm2022/common/models/responsive-breakpoints.mjs +0 -5
  72. package/esm2022/common/models/rounded.mjs +0 -5
  73. package/esm2022/common/models/size.mjs +0 -5
  74. package/esm2022/common/models/styling-classes.mjs +0 -5
  75. package/esm2022/common/models/type.mjs +0 -5
  76. package/esm2022/common/models.mjs +0 -9
  77. package/esm2022/common/radio-checkbox.base.mjs +0 -295
  78. package/esm2022/common/utils.mjs +0 -88
  79. package/esm2022/directives.mjs +0 -430
  80. package/esm2022/form/form.component.mjs +0 -163
  81. package/esm2022/form/formseparator.component.mjs +0 -80
  82. package/esm2022/form/utils.mjs +0 -147
  83. package/esm2022/form.module.mjs +0 -46
  84. package/esm2022/formfield/error.component.mjs +0 -70
  85. package/esm2022/formfield/formfield.component.mjs +0 -353
  86. package/esm2022/formfield/hint.component.mjs +0 -65
  87. package/esm2022/formfield/models/message-align.mjs +0 -5
  88. package/esm2022/formfield/models/orientation.mjs +0 -5
  89. package/esm2022/formfield/models/show-options.mjs +0 -5
  90. package/esm2022/formfield.module.mjs +0 -43
  91. package/esm2022/formfieldset/formfieldset.component.mjs +0 -174
  92. package/esm2022/index.mjs +0 -91
  93. package/esm2022/inputs.module.mjs +0 -91
  94. package/esm2022/maskedtextbox/maskedtextbox.component.mjs +0 -876
  95. package/esm2022/maskedtextbox/masking.service.mjs +0 -189
  96. package/esm2022/maskedtextbox/parsing/combinators.mjs +0 -28
  97. package/esm2022/maskedtextbox/parsing/parsers.mjs +0 -148
  98. package/esm2022/maskedtextbox/parsing/result.mjs +0 -44
  99. package/esm2022/maskedtextbox/parsing/stream.mjs +0 -43
  100. package/esm2022/maskedtextbox.module.mjs +0 -43
  101. package/esm2022/numerictextbox/arrow-direction.mjs +0 -13
  102. package/esm2022/numerictextbox/constants.mjs +0 -28
  103. package/esm2022/numerictextbox/localization/custom-messages.component.mjs +0 -55
  104. package/esm2022/numerictextbox/localization/localized-numerictextbox-messages.directive.mjs +0 -39
  105. package/esm2022/numerictextbox/localization/messages.mjs +0 -33
  106. package/esm2022/numerictextbox/numerictextbox.component.mjs +0 -1314
  107. package/esm2022/numerictextbox/utils.mjs +0 -92
  108. package/esm2022/numerictextbox.module.mjs +0 -46
  109. package/esm2022/otp.module.mjs +0 -44
  110. package/esm2022/otpinput/localization/custom-messages.component.mjs +0 -45
  111. package/esm2022/otpinput/localization/localized-textbox-messages.directive.mjs +0 -39
  112. package/esm2022/otpinput/localization/messages.mjs +0 -34
  113. package/esm2022/otpinput/models/otpinput-type.mjs +0 -5
  114. package/esm2022/otpinput/models/separator-icon.mjs +0 -5
  115. package/esm2022/otpinput/otpinput-separator.component.mjs +0 -93
  116. package/esm2022/otpinput/otpinput.component.mjs +0 -936
  117. package/esm2022/package-metadata.mjs +0 -16
  118. package/esm2022/progress-kendo-angular-inputs.mjs +0 -8
  119. package/esm2022/radiobutton/radiobutton.component.mjs +0 -212
  120. package/esm2022/radiobutton/radiobutton.directive.mjs +0 -81
  121. package/esm2022/radiobutton.module.mjs +0 -43
  122. package/esm2022/rangeslider/localization/custom-messages.component.mjs +0 -53
  123. package/esm2022/rangeslider/localization/localized-rangeslider-messages.directive.mjs +0 -39
  124. package/esm2022/rangeslider/localization/messages.mjs +0 -33
  125. package/esm2022/rangeslider/rangeslider-model.mjs +0 -53
  126. package/esm2022/rangeslider/rangeslider-value.type.mjs +0 -5
  127. package/esm2022/rangeslider/rangeslider.component.mjs +0 -625
  128. package/esm2022/rangeslider.module.mjs +0 -46
  129. package/esm2022/rating/directives/rating-hovered-item.directive.mjs +0 -35
  130. package/esm2022/rating/directives/rating-item.directive.mjs +0 -34
  131. package/esm2022/rating/directives/rating-selected-item.directive.mjs +0 -36
  132. package/esm2022/rating/models/precision.mjs +0 -5
  133. package/esm2022/rating/models/rating-item.interface.mjs +0 -5
  134. package/esm2022/rating/models/selection.mjs +0 -5
  135. package/esm2022/rating/rating.component.mjs +0 -754
  136. package/esm2022/rating.module.mjs +0 -46
  137. package/esm2022/shared/input-separator.component.mjs +0 -55
  138. package/esm2022/shared/input-spacer.component.mjs +0 -56
  139. package/esm2022/shared/shared-events.directive.mjs +0 -102
  140. package/esm2022/shared/utils.mjs +0 -13
  141. package/esm2022/signature/events/close-event.mjs +0 -10
  142. package/esm2022/signature/events/index.mjs +0 -6
  143. package/esm2022/signature/events/open-event.mjs +0 -10
  144. package/esm2022/signature/localization/custom-messages.component.mjs +0 -43
  145. package/esm2022/signature/localization/index.mjs +0 -7
  146. package/esm2022/signature/localization/localized-signature-messages.directive.mjs +0 -39
  147. package/esm2022/signature/localization/messages.mjs +0 -45
  148. package/esm2022/signature/signature.component.mjs +0 -981
  149. package/esm2022/signature.module.mjs +0 -47
  150. package/esm2022/slider/localization/custom-messages.component.mjs +0 -43
  151. package/esm2022/slider/localization/localized-slider-messages.directive.mjs +0 -39
  152. package/esm2022/slider/localization/messages.mjs +0 -39
  153. package/esm2022/slider/slider-model.mjs +0 -32
  154. package/esm2022/slider/slider.component.mjs +0 -671
  155. package/esm2022/slider.module.mjs +0 -48
  156. package/esm2022/sliders-common/label-template.directive.mjs +0 -37
  157. package/esm2022/sliders-common/slider-base.mjs +0 -300
  158. package/esm2022/sliders-common/slider-model.base.mjs +0 -118
  159. package/esm2022/sliders-common/slider-ticks.component.mjs +0 -147
  160. package/esm2022/sliders-common/sliders-util.mjs +0 -206
  161. package/esm2022/sliders-common/title-callback.mjs +0 -5
  162. package/esm2022/switch/events/blur-event.mjs +0 -13
  163. package/esm2022/switch/events/focus-event.mjs +0 -13
  164. package/esm2022/switch/localization/custom-messages.component.mjs +0 -43
  165. package/esm2022/switch/localization/localized-switch-messages.directive.mjs +0 -39
  166. package/esm2022/switch/localization/messages.mjs +0 -33
  167. package/esm2022/switch/switch.component.mjs +0 -585
  168. package/esm2022/switch.module.mjs +0 -44
  169. package/esm2022/text-fields-common/text-fields-base.mjs +0 -150
  170. package/esm2022/textarea/models/adornments-orientation.mjs +0 -5
  171. package/esm2022/textarea/models/flow.mjs +0 -5
  172. package/esm2022/textarea/models/resize.mjs +0 -5
  173. package/esm2022/textarea/models/textarea-settings.mjs +0 -5
  174. package/esm2022/textarea/textarea-prefix.component.mjs +0 -67
  175. package/esm2022/textarea/textarea-suffix.component.mjs +0 -67
  176. package/esm2022/textarea/textarea.component.mjs +0 -740
  177. package/esm2022/textarea/textarea.directive.mjs +0 -288
  178. package/esm2022/textarea.module.mjs +0 -46
  179. package/esm2022/textbox/localization/custom-messages.component.mjs +0 -43
  180. package/esm2022/textbox/localization/localized-textbox-messages.directive.mjs +0 -39
  181. package/esm2022/textbox/localization/messages.mjs +0 -27
  182. package/esm2022/textbox/models/icon-show-options.mjs +0 -5
  183. package/esm2022/textbox/textbox-prefix.directive.mjs +0 -50
  184. package/esm2022/textbox/textbox-suffix.directive.mjs +0 -49
  185. package/esm2022/textbox/textbox.component.mjs +0 -933
  186. package/esm2022/textbox/textbox.directive.mjs +0 -125
  187. package/esm2022/textbox.module.mjs +0 -51
  188. package/esm2022/validators/max.validator.mjs +0 -21
  189. package/esm2022/validators/min.validator.mjs +0 -21
@@ -1,498 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
- import { Component, Input, Output, EventEmitter, ElementRef, HostBinding, ViewChild, Renderer2, ChangeDetectorRef } from '@angular/core';
7
- import { getRGBA, parseColor, getColorFromRGBA } from './utils';
8
- import { isPresent } from '../common/utils';
9
- import { guid, isDocumentAvailable } from '@progress/kendo-angular-common';
10
- import { Subscription } from 'rxjs';
11
- import { LocalizationService } from '@progress/kendo-angular-l10n';
12
- import { NumericTextBoxComponent } from './../numerictextbox/numerictextbox.component';
13
- import { caretAltExpandIcon } from '@progress/kendo-svg-icons';
14
- import { NumericLabelDirective } from './color-gradient-numeric-label.directive';
15
- import { ButtonComponent } from '@progress/kendo-angular-buttons';
16
- import { TextBoxComponent } from '../textbox/textbox.component';
17
- import { TextLabelDirective } from './color-gradient-text-label.directive';
18
- import * as i0 from "@angular/core";
19
- import * as i1 from "@progress/kendo-angular-l10n";
20
- const DEFAULT_SIZE = 'medium';
21
- /**
22
- * @hidden
23
- */
24
- export class ColorInputComponent {
25
- host;
26
- renderer;
27
- cdr;
28
- localizationService;
29
- /**
30
- * Sets the `id` of the hex input.
31
- */
32
- focusableId = `k-${guid()}`;
33
- /**
34
- * Sets the color format view.
35
- */
36
- formatView;
37
- /**
38
- * Sets the size of the ColorInput.
39
- *
40
- * @default 'medium'
41
- */
42
- size = DEFAULT_SIZE;
43
- /**
44
- * Sets the `tabindex` of the inputs.
45
- * @default -1
46
- */
47
- tabindex = -1;
48
- /**
49
- * Sets the color value to parse and populate the hex and RGBA inputs.
50
- */
51
- value;
52
- /**
53
- * Shows or hides the alpha slider.
54
- *
55
- * @default true
56
- */
57
- opacity = true;
58
- /**
59
- * Disables the ColorInput.
60
- *
61
- * @default false
62
- */
63
- disabled = false;
64
- /**
65
- * Sets the read-only state of the ColorInput.
66
- *
67
- * @default false
68
- */
69
- readonly = false;
70
- /**
71
- * Emits a parsed RGBA string color.
72
- */
73
- valueChange = new EventEmitter();
74
- /**
75
- * Fires when the user tabs out of the last focusable input.
76
- */
77
- tabOut = new EventEmitter();
78
- colorInputClass = true;
79
- opacityInput;
80
- hexInput;
81
- blueInput;
82
- toggleFormatButton;
83
- /**
84
- * Holds the RGBA input values.
85
- */
86
- rgba = {};
87
- /*
88
- * Holds the hex input value.
89
- */
90
- hex;
91
- /**
92
- * Returns `true` if any of the inputs are focused.
93
- */
94
- get isFocused() {
95
- if (!(isDocumentAvailable() && isPresent(this.host))) {
96
- return false;
97
- }
98
- const activeElement = document.activeElement;
99
- return this.host.nativeElement.contains(activeElement);
100
- }
101
- /**
102
- * Returns `true` if all RGBA inputs have values.
103
- */
104
- get rgbaInputValid() {
105
- return Object.keys(this.rgba).every(key => isPresent(this.rgba[key]));
106
- }
107
- /**
108
- * @hidden
109
- */
110
- caretAltExpandIcon = caretAltExpandIcon;
111
- subscriptions = new Subscription();
112
- constructor(host, renderer, cdr, localizationService) {
113
- this.host = host;
114
- this.renderer = renderer;
115
- this.cdr = cdr;
116
- this.localizationService = localizationService;
117
- }
118
- ngAfterViewInit() {
119
- this.initDomEvents();
120
- }
121
- ngOnDestroy() {
122
- if (this.subscriptions) {
123
- this.subscriptions.unsubscribe();
124
- }
125
- }
126
- ngOnChanges(changes) {
127
- if (isPresent(changes['value']) && !this.isFocused) {
128
- this.hex = parseColor(this.value, 'hex', this.opacity);
129
- this.rgba = getRGBA(this.value);
130
- this.rgba.a = parseColor(this.value, 'rgba', this.opacity) ? this.rgba.a : 1;
131
- }
132
- }
133
- get formatButtonTitle() {
134
- return this.localizationService.get('formatButton');
135
- }
136
- handleRgbaValueChange() {
137
- const color = getColorFromRGBA(this.rgba);
138
- if (!this.rgbaInputValid || color === this.value) {
139
- return;
140
- }
141
- this.value = color;
142
- this.rgba = getRGBA(this.value);
143
- this.hex = parseColor(color, 'hex', this.opacity);
144
- this.valueChange.emit(color);
145
- }
146
- focusDragHandle(event) {
147
- event.preventDefault();
148
- event.stopImmediatePropagation();
149
- this.tabOut.emit();
150
- }
151
- handleHexValueChange(hex) {
152
- this.hex = hex;
153
- const color = parseColor(hex, 'rgba', this.opacity);
154
- if (!isPresent(color) || color === this.value) {
155
- return;
156
- }
157
- this.value = color;
158
- this.rgba = getRGBA(color);
159
- this.valueChange.emit(color);
160
- }
161
- handleRgbaInputBlur() {
162
- if (!this.rgbaInputValid) {
163
- this.rgba = getRGBA(this.value);
164
- }
165
- }
166
- handleHexInputBlur() {
167
- this.hex = parseColor(this.value, 'hex', this.opacity);
168
- }
169
- focusLast() {
170
- this.lastInput().focus();
171
- }
172
- onTab() {
173
- if (this.opacity) {
174
- return;
175
- }
176
- }
177
- toggleFormatView() {
178
- this.formatView = this.formatView === 'hex' ? 'rgba' : 'hex';
179
- // needed to update the view when ChangeDetectionStrategy.OnPush
180
- this.cdr.markForCheck();
181
- }
182
- initDomEvents() {
183
- if (!this.host) {
184
- return;
185
- }
186
- this.subscriptions.add(this.renderer.listen(this.toggleFormatButton.nativeElement, 'click', () => this.toggleFormatView()));
187
- }
188
- lastInput() {
189
- return this.hexInput?.nativeElement || this.opacityInput || this.blueInput;
190
- }
191
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorInputComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
192
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ColorInputComponent, isStandalone: true, selector: "kendo-colorinput", inputs: { focusableId: "focusableId", formatView: "formatView", size: "size", tabindex: "tabindex", value: "value", opacity: "opacity", disabled: "disabled", readonly: "readonly" }, outputs: { valueChange: "valueChange", tabOut: "tabOut" }, host: { properties: { "class.k-colorgradient-inputs": "this.colorInputClass", "class.k-hstack": "this.colorInputClass" } }, viewQueries: [{ propertyName: "opacityInput", first: true, predicate: ["opacityInput"], descendants: true }, { propertyName: "hexInput", first: true, predicate: ["hexInput"], descendants: true }, { propertyName: "blueInput", first: true, predicate: ["blue"], descendants: true }, { propertyName: "toggleFormatButton", first: true, predicate: ["toggleFormatButton"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: `
193
- <div class="k-vstack">
194
- <button
195
- kendoButton
196
- type="button"
197
- fillMode="flat"
198
- #toggleFormatButton
199
- icon="caret-alt-expand"
200
- [svgIcon]="caretAltExpandIcon"
201
- [size]="size"
202
- class="k-colorgradient-toggle-mode"
203
- [attr.aria-label]="formatButtonTitle"
204
- [attr.title]="formatButtonTitle"
205
- [disabled]="disabled"
206
- [tabindex]="tabindex.toString()"
207
- >
208
- </button>
209
- </div>
210
- @if (formatView === 'hex') {
211
- <div class="k-vstack k-flex-1">
212
- <kendo-textbox
213
- #hexInput
214
- kendoTextLabel
215
- [focusableId]="focusableId"
216
- class="k-hex-value"
217
- [size]="size"
218
- [class.k-readonly]="readonly"
219
- [disabled]="disabled"
220
- [readonly]="readonly"
221
- [value]="hex || ''"
222
- (blur)="handleHexInputBlur()"
223
- (input)="handleHexValueChange(hexInput.value)"
224
- [tabindex]="tabindex"
225
- (keydown.tab)="focusDragHandle($event)">
226
- </kendo-textbox>
227
- <label [for]="focusableId" class="k-colorgradient-input-label">HEX</label>
228
- </div>
229
- }
230
- @if (formatView === 'rgba') {
231
- <div class="k-vstack">
232
- <kendo-numerictextbox
233
- #red
234
- kendoAdditionalNumericLabel="red"
235
- [localizationService]="localizationService"
236
- [disabled]="disabled"
237
- [size]="size"
238
- [readonly]="readonly"
239
- [tabindex]="tabindex"
240
- [min]="0"
241
- [max]="255"
242
- [(value)]="rgba.r"
243
- [autoCorrect]="true"
244
- [spinners]="false"
245
- [format]="'n'"
246
- [decimals]="0"
247
- (blur)="handleRgbaInputBlur()"
248
- (valueChange)="handleRgbaValueChange()">
249
- </kendo-numerictextbox>
250
- <label [for]="red.focusableId" class="k-colorgradient-input-label">R</label>
251
- </div>
252
- <div class="k-vstack">
253
- <kendo-numerictextbox
254
- #green
255
- kendoAdditionalNumericLabel="green"
256
- [localizationService]="localizationService"
257
- [disabled]="disabled"
258
- [readonly]="readonly"
259
- [tabindex]="tabindex"
260
- [size]="size"
261
- [min]="0"
262
- [max]="255"
263
- [(value)]="rgba.g"
264
- [autoCorrect]="true"
265
- [spinners]="false"
266
- [format]="'n'"
267
- [decimals]="0"
268
- (blur)="handleRgbaInputBlur()"
269
- (valueChange)="handleRgbaValueChange()">
270
- </kendo-numerictextbox>
271
- <label [for]="green.focusableId" class="k-colorgradient-input-label">G</label>
272
- </div>
273
- <div class="k-vstack">
274
- <kendo-numerictextbox
275
- #blue
276
- kendoAdditionalNumericLabel="blue"
277
- [localizationService]="localizationService"
278
- [disabled]="disabled"
279
- [readonly]="readonly"
280
- [tabindex]="tabindex"
281
- [size]="size"
282
- [min]="0"
283
- [max]="255"
284
- [(value)]="rgba.b"
285
- [autoCorrect]="true"
286
- [spinners]="false"
287
- [format]="'n'"
288
- [decimals]="0"
289
- (blur)="handleRgbaInputBlur()"
290
- (valueChange)="handleRgbaValueChange()"
291
- (keydown.tab)="onTab()">
292
- </kendo-numerictextbox>
293
- <label [for]="blue.focusableId" class="k-colorgradient-input-label">B</label>
294
- </div>
295
- @if (opacity) {
296
- <div class="k-vstack">
297
- <kendo-numerictextbox #opacityInput
298
- #alpha
299
- kendoAdditionalNumericLabel="alpha"
300
- [localizationService]="localizationService"
301
- [disabled]="disabled"
302
- [readonly]="readonly"
303
- [tabindex]="tabindex"
304
- [size]="size"
305
- [min]="0"
306
- [max]="1"
307
- [(value)]="rgba.a"
308
- [autoCorrect]="true"
309
- [spinners]="false"
310
- [step]="0.01"
311
- [format]="'n2'"
312
- [decimals]="2"
313
- (blur)="handleRgbaInputBlur()"
314
- (valueChange)="handleRgbaValueChange()"
315
- (keydown.tab)="focusDragHandle($event)">
316
- </kendo-numerictextbox>
317
- <label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
318
- </div>
319
- }
320
- }
321
- `, isInline: true, dependencies: [{ 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: NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }, { kind: "directive", type: NumericLabelDirective, selector: "[kendoAdditionalNumericLabel]", inputs: ["kendoAdditionalNumericLabel", "localizationService"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: TextLabelDirective, selector: "[kendoTextLabel]", inputs: ["focusableId"] }] });
322
- }
323
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorInputComponent, decorators: [{
324
- type: Component,
325
- args: [{
326
- selector: 'kendo-colorinput',
327
- template: `
328
- <div class="k-vstack">
329
- <button
330
- kendoButton
331
- type="button"
332
- fillMode="flat"
333
- #toggleFormatButton
334
- icon="caret-alt-expand"
335
- [svgIcon]="caretAltExpandIcon"
336
- [size]="size"
337
- class="k-colorgradient-toggle-mode"
338
- [attr.aria-label]="formatButtonTitle"
339
- [attr.title]="formatButtonTitle"
340
- [disabled]="disabled"
341
- [tabindex]="tabindex.toString()"
342
- >
343
- </button>
344
- </div>
345
- @if (formatView === 'hex') {
346
- <div class="k-vstack k-flex-1">
347
- <kendo-textbox
348
- #hexInput
349
- kendoTextLabel
350
- [focusableId]="focusableId"
351
- class="k-hex-value"
352
- [size]="size"
353
- [class.k-readonly]="readonly"
354
- [disabled]="disabled"
355
- [readonly]="readonly"
356
- [value]="hex || ''"
357
- (blur)="handleHexInputBlur()"
358
- (input)="handleHexValueChange(hexInput.value)"
359
- [tabindex]="tabindex"
360
- (keydown.tab)="focusDragHandle($event)">
361
- </kendo-textbox>
362
- <label [for]="focusableId" class="k-colorgradient-input-label">HEX</label>
363
- </div>
364
- }
365
- @if (formatView === 'rgba') {
366
- <div class="k-vstack">
367
- <kendo-numerictextbox
368
- #red
369
- kendoAdditionalNumericLabel="red"
370
- [localizationService]="localizationService"
371
- [disabled]="disabled"
372
- [size]="size"
373
- [readonly]="readonly"
374
- [tabindex]="tabindex"
375
- [min]="0"
376
- [max]="255"
377
- [(value)]="rgba.r"
378
- [autoCorrect]="true"
379
- [spinners]="false"
380
- [format]="'n'"
381
- [decimals]="0"
382
- (blur)="handleRgbaInputBlur()"
383
- (valueChange)="handleRgbaValueChange()">
384
- </kendo-numerictextbox>
385
- <label [for]="red.focusableId" class="k-colorgradient-input-label">R</label>
386
- </div>
387
- <div class="k-vstack">
388
- <kendo-numerictextbox
389
- #green
390
- kendoAdditionalNumericLabel="green"
391
- [localizationService]="localizationService"
392
- [disabled]="disabled"
393
- [readonly]="readonly"
394
- [tabindex]="tabindex"
395
- [size]="size"
396
- [min]="0"
397
- [max]="255"
398
- [(value)]="rgba.g"
399
- [autoCorrect]="true"
400
- [spinners]="false"
401
- [format]="'n'"
402
- [decimals]="0"
403
- (blur)="handleRgbaInputBlur()"
404
- (valueChange)="handleRgbaValueChange()">
405
- </kendo-numerictextbox>
406
- <label [for]="green.focusableId" class="k-colorgradient-input-label">G</label>
407
- </div>
408
- <div class="k-vstack">
409
- <kendo-numerictextbox
410
- #blue
411
- kendoAdditionalNumericLabel="blue"
412
- [localizationService]="localizationService"
413
- [disabled]="disabled"
414
- [readonly]="readonly"
415
- [tabindex]="tabindex"
416
- [size]="size"
417
- [min]="0"
418
- [max]="255"
419
- [(value)]="rgba.b"
420
- [autoCorrect]="true"
421
- [spinners]="false"
422
- [format]="'n'"
423
- [decimals]="0"
424
- (blur)="handleRgbaInputBlur()"
425
- (valueChange)="handleRgbaValueChange()"
426
- (keydown.tab)="onTab()">
427
- </kendo-numerictextbox>
428
- <label [for]="blue.focusableId" class="k-colorgradient-input-label">B</label>
429
- </div>
430
- @if (opacity) {
431
- <div class="k-vstack">
432
- <kendo-numerictextbox #opacityInput
433
- #alpha
434
- kendoAdditionalNumericLabel="alpha"
435
- [localizationService]="localizationService"
436
- [disabled]="disabled"
437
- [readonly]="readonly"
438
- [tabindex]="tabindex"
439
- [size]="size"
440
- [min]="0"
441
- [max]="1"
442
- [(value)]="rgba.a"
443
- [autoCorrect]="true"
444
- [spinners]="false"
445
- [step]="0.01"
446
- [format]="'n2'"
447
- [decimals]="2"
448
- (blur)="handleRgbaInputBlur()"
449
- (valueChange)="handleRgbaValueChange()"
450
- (keydown.tab)="focusDragHandle($event)">
451
- </kendo-numerictextbox>
452
- <label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
453
- </div>
454
- }
455
- }
456
- `,
457
- standalone: true,
458
- imports: [ButtonComponent, NumericTextBoxComponent, NumericLabelDirective, TextBoxComponent, TextLabelDirective]
459
- }]
460
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }], propDecorators: { focusableId: [{
461
- type: Input
462
- }], formatView: [{
463
- type: Input
464
- }], size: [{
465
- type: Input
466
- }], tabindex: [{
467
- type: Input
468
- }], value: [{
469
- type: Input
470
- }], opacity: [{
471
- type: Input
472
- }], disabled: [{
473
- type: Input
474
- }], readonly: [{
475
- type: Input
476
- }], valueChange: [{
477
- type: Output
478
- }], tabOut: [{
479
- type: Output
480
- }], colorInputClass: [{
481
- type: HostBinding,
482
- args: ['class.k-colorgradient-inputs']
483
- }, {
484
- type: HostBinding,
485
- args: ['class.k-hstack']
486
- }], opacityInput: [{
487
- type: ViewChild,
488
- args: ['opacityInput']
489
- }], hexInput: [{
490
- type: ViewChild,
491
- args: ['hexInput']
492
- }], blueInput: [{
493
- type: ViewChild,
494
- args: ['blue']
495
- }], toggleFormatButton: [{
496
- type: ViewChild,
497
- args: ['toggleFormatButton', { static: false, read: ElementRef }]
498
- }] } });