@progress/kendo-angular-inputs 18.1.0-develop.9 → 18.1.0
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/colorpicker/adaptiveness/adaptive-close-button.component.d.ts +20 -0
- package/colorpicker/adaptiveness/adaptive-renderer.component.d.ts +38 -0
- package/colorpicker/color-gradient-text-label.directive.d.ts +19 -0
- package/colorpicker/color-gradient.component.d.ts +19 -1
- package/colorpicker/color-input.component.d.ts +15 -3
- package/colorpicker/color-palette.component.d.ts +16 -6
- package/colorpicker/colorpicker.component.d.ts +55 -8
- package/colorpicker/flatcolorpicker-actions.component.d.ts +3 -1
- package/colorpicker/flatcolorpicker-header.component.d.ts +3 -1
- package/colorpicker/flatcolorpicker.component.d.ts +19 -1
- package/colorpicker/localization/messages.d.ts +9 -1
- package/colorpicker/models/adaptive-mode.d.ts +23 -0
- package/esm2022/colorpicker/adaptiveness/adaptive-close-button.component.mjs +62 -0
- package/esm2022/colorpicker/adaptiveness/adaptive-renderer.component.mjs +205 -0
- package/esm2022/colorpicker/color-gradient-text-label.directive.mjs +34 -0
- package/esm2022/colorpicker/color-gradient.component.mjs +75 -17
- package/esm2022/colorpicker/color-input.component.mjs +56 -23
- package/esm2022/colorpicker/color-palette.component.mjs +45 -15
- package/esm2022/colorpicker/colorpicker.component.mjs +182 -41
- package/esm2022/colorpicker/flatcolorpicker-actions.component.mjs +22 -7
- package/esm2022/colorpicker/flatcolorpicker-header.component.mjs +8 -3
- package/esm2022/colorpicker/flatcolorpicker.component.mjs +72 -17
- package/esm2022/colorpicker/localization/messages.mjs +13 -1
- package/esm2022/colorpicker/models/adaptive-mode.mjs +27 -0
- package/esm2022/colorpicker/services/flatcolorpicker.service.mjs +3 -3
- package/esm2022/colorpicker.module.mjs +3 -2
- package/esm2022/inputs.module.mjs +3 -2
- package/esm2022/otpinput/otpinput.component.mjs +75 -45
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-inputs.mjs +9170 -8497
- package/otpinput/models/separator-icon.d.ts +9 -3
- package/otpinput/otpinput.component.d.ts +4 -7
- package/package.json +13 -11
|
@@ -24,6 +24,7 @@ export class FlatColorPickerHeaderComponent {
|
|
|
24
24
|
innerTabIndex = -1;
|
|
25
25
|
value;
|
|
26
26
|
selection;
|
|
27
|
+
size;
|
|
27
28
|
viewChange = new EventEmitter();
|
|
28
29
|
valuePaneClick = new EventEmitter();
|
|
29
30
|
clearButtonClick = new EventEmitter();
|
|
@@ -71,7 +72,7 @@ export class FlatColorPickerHeaderComponent {
|
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatColorPickerHeaderComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
74
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FlatColorPickerHeaderComponent, isStandalone: true, selector: "[kendoFlatColorPickerHeader]", inputs: { clearButton: "clearButton", activeView: "activeView", views: "views", preview: "preview", innerTabIndex: "innerTabIndex", value: "value", selection: "selection" }, outputs: { viewChange: "viewChange", valuePaneClick: "valuePaneClick", clearButtonClick: "clearButtonClick", tabOut: "tabOut" }, host: { properties: { "class.k-coloreditor-header": "this.hostClasses", "class.k-hstack": "this.hostClasses" } }, viewQueries: [{ propertyName: "clearButtonElement", first: true, predicate: ["clearButton"], descendants: true, read: ElementRef }, { propertyName: "viewButtonsCollection", predicate: ["viewButtons"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
75
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FlatColorPickerHeaderComponent, isStandalone: true, selector: "[kendoFlatColorPickerHeader]", inputs: { clearButton: "clearButton", activeView: "activeView", views: "views", preview: "preview", innerTabIndex: "innerTabIndex", value: "value", selection: "selection", size: "size" }, outputs: { viewChange: "viewChange", valuePaneClick: "valuePaneClick", clearButtonClick: "clearButtonClick", tabOut: "tabOut" }, host: { properties: { "class.k-coloreditor-header": "this.hostClasses", "class.k-hstack": "this.hostClasses" } }, viewQueries: [{ propertyName: "clearButtonElement", first: true, predicate: ["clearButton"], descendants: true, read: ElementRef }, { propertyName: "viewButtonsCollection", predicate: ["viewButtons"], descendants: true, read: ElementRef }], ngImport: i0, template: `
|
|
75
76
|
<div class="k-coloreditor-header-actions k-hstack">
|
|
76
77
|
<div
|
|
77
78
|
*ngIf="viewButtons"
|
|
@@ -89,7 +90,7 @@ export class FlatColorPickerHeaderComponent {
|
|
|
89
90
|
[icon]="getViewButtonIcon(view)"
|
|
90
91
|
[svgIcon]="getViewButtonsSVGIcon(view)"
|
|
91
92
|
(keydown.shift.tab)="onHeaderTabOut($event, i)"
|
|
92
|
-
|
|
93
|
+
[size]="size"
|
|
93
94
|
[attr.title]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
94
95
|
[attr.aria-label]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
95
96
|
[attr.aria-pressed]="activeView === view"
|
|
@@ -105,6 +106,7 @@ export class FlatColorPickerHeaderComponent {
|
|
|
105
106
|
[tabindex]="innerTabIndex.toString()"
|
|
106
107
|
*ngIf="clearButton"
|
|
107
108
|
#clearButton
|
|
109
|
+
[size]="size"
|
|
108
110
|
fillMode="flat"
|
|
109
111
|
icon="reset-color"
|
|
110
112
|
[svgIcon]="dropletSlashIcon"
|
|
@@ -151,7 +153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
151
153
|
[icon]="getViewButtonIcon(view)"
|
|
152
154
|
[svgIcon]="getViewButtonsSVGIcon(view)"
|
|
153
155
|
(keydown.shift.tab)="onHeaderTabOut($event, i)"
|
|
154
|
-
|
|
156
|
+
[size]="size"
|
|
155
157
|
[attr.title]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
156
158
|
[attr.aria-label]="getText(view === 'gradient' ? 'gradientView' : 'paletteView')"
|
|
157
159
|
[attr.aria-pressed]="activeView === view"
|
|
@@ -167,6 +169,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
167
169
|
[tabindex]="innerTabIndex.toString()"
|
|
168
170
|
*ngIf="clearButton"
|
|
169
171
|
#clearButton
|
|
172
|
+
[size]="size"
|
|
170
173
|
fillMode="flat"
|
|
171
174
|
icon="reset-color"
|
|
172
175
|
[svgIcon]="dropletSlashIcon"
|
|
@@ -212,6 +215,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
212
215
|
type: Input
|
|
213
216
|
}], selection: [{
|
|
214
217
|
type: Input
|
|
218
|
+
}], size: [{
|
|
219
|
+
type: Input
|
|
215
220
|
}], viewChange: [{
|
|
216
221
|
type: Output
|
|
217
222
|
}], valuePaneClick: [{
|
|
@@ -15,7 +15,7 @@ import { FlatColorPickerService } from './services/flatcolorpicker.service';
|
|
|
15
15
|
import { packageMetadata } from "../package-metadata";
|
|
16
16
|
import { ColorPickerCancelEvent } from './events';
|
|
17
17
|
import { parseColor } from './utils';
|
|
18
|
-
import { isPresent } from '../common/utils';
|
|
18
|
+
import { getStylingClasses, isPresent } from '../common/utils';
|
|
19
19
|
import { ColorGradientComponent } from './color-gradient.component';
|
|
20
20
|
import { ColorPaletteComponent } from './color-palette.component';
|
|
21
21
|
import { FlatColorPickerHeaderComponent } from './flatcolorpicker-header.component';
|
|
@@ -27,6 +27,7 @@ import { LocalizedColorPickerMessagesDirective } from "./localization/localized-
|
|
|
27
27
|
import * as i0 from "@angular/core";
|
|
28
28
|
import * as i1 from "./services/flatcolorpicker.service";
|
|
29
29
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
30
|
+
const DEFAULT_SIZE = 'medium';
|
|
30
31
|
/**
|
|
31
32
|
* Represents the [Kendo UI FlatColorPicker component for Angular]({% slug overview_flatcolorpicker %}).
|
|
32
33
|
*
|
|
@@ -177,6 +178,10 @@ export class FlatColorPickerComponent {
|
|
|
177
178
|
get gradientSettings() {
|
|
178
179
|
return this._gradientSettings;
|
|
179
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* @hidden
|
|
183
|
+
*/
|
|
184
|
+
adaptiveMode = false;
|
|
180
185
|
/**
|
|
181
186
|
* Configures the palette view.
|
|
182
187
|
*/
|
|
@@ -186,6 +191,23 @@ export class FlatColorPickerComponent {
|
|
|
186
191
|
get paletteSettings() {
|
|
187
192
|
return this._paletteSettings;
|
|
188
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* The size property specifies the padding of the FlatColorPicker internal elements.
|
|
196
|
+
*
|
|
197
|
+
* The possible values are:
|
|
198
|
+
* * `small`
|
|
199
|
+
* * `medium` (default)
|
|
200
|
+
* * `large`
|
|
201
|
+
* * `none`
|
|
202
|
+
*/
|
|
203
|
+
set size(size) {
|
|
204
|
+
const newSize = size || DEFAULT_SIZE;
|
|
205
|
+
this.handleClasses(newSize, 'size');
|
|
206
|
+
this._size = newSize;
|
|
207
|
+
}
|
|
208
|
+
get size() {
|
|
209
|
+
return this._size;
|
|
210
|
+
}
|
|
189
211
|
/**
|
|
190
212
|
* Fires each time the component value is changed.
|
|
191
213
|
*/
|
|
@@ -233,6 +255,7 @@ export class FlatColorPickerComponent {
|
|
|
233
255
|
dynamicRTLSubscription;
|
|
234
256
|
subscriptions = new Subscription();
|
|
235
257
|
internalNavigation = false;
|
|
258
|
+
_size = 'medium';
|
|
236
259
|
control;
|
|
237
260
|
/**
|
|
238
261
|
* @hidden
|
|
@@ -269,6 +292,10 @@ export class FlatColorPickerComponent {
|
|
|
269
292
|
this.setActiveView();
|
|
270
293
|
}
|
|
271
294
|
ngAfterViewInit() {
|
|
295
|
+
const stylingInputs = ['size'];
|
|
296
|
+
stylingInputs.forEach(input => {
|
|
297
|
+
this.handleClasses(this[input], input);
|
|
298
|
+
});
|
|
272
299
|
this.setHostElementAriaLabel();
|
|
273
300
|
this.initDomEvents();
|
|
274
301
|
this.setSizingVariables();
|
|
@@ -456,12 +483,14 @@ export class FlatColorPickerComponent {
|
|
|
456
483
|
setSizingVariables() {
|
|
457
484
|
const paletteTileSize = this.service.paletteTileLayout(this.paletteSettings.tileSize);
|
|
458
485
|
const element = this.host.nativeElement.querySelector('.k-coloreditor-views.k-vstack');
|
|
459
|
-
const cssProperties =
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
486
|
+
const cssProperties = [`--kendo-color-preview-columns: ${this.paletteSettings.columns};`];
|
|
487
|
+
if (paletteTileSize.width) {
|
|
488
|
+
cssProperties.push(`--kendo-color-preview-width: ${paletteTileSize.width}px;`);
|
|
489
|
+
}
|
|
490
|
+
if (paletteTileSize.height) {
|
|
491
|
+
cssProperties.push(`--kendo-color-preview-height: ${paletteTileSize.height}px;`);
|
|
492
|
+
}
|
|
493
|
+
this.renderer.setProperty(element, 'style', cssProperties.join(' '));
|
|
465
494
|
}
|
|
466
495
|
changeCurrentValue(color) {
|
|
467
496
|
this.selection = color;
|
|
@@ -514,8 +543,18 @@ export class FlatColorPickerComponent {
|
|
|
514
543
|
this.gradientElement && this.renderer.removeAttribute(this.gradientElement.nativeElement, 'role');
|
|
515
544
|
this.gradientElement && this.renderer.removeAttribute(this.gradientElement.nativeElement, 'aria-label');
|
|
516
545
|
}
|
|
546
|
+
handleClasses(value, input) {
|
|
547
|
+
const elem = this.host.nativeElement;
|
|
548
|
+
const classes = getStylingClasses('coloreditor', input, this[input], value);
|
|
549
|
+
if (classes.toRemove) {
|
|
550
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
551
|
+
}
|
|
552
|
+
if (classes.toAdd) {
|
|
553
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
517
556
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatColorPickerComponent, deps: [{ token: i0.ElementRef }, { token: i1.FlatColorPickerService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
518
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FlatColorPickerComponent, isStandalone: true, selector: "kendo-flatcolorpicker", inputs: { readonly: "readonly", disabled: "disabled", format: "format", value: "value", tabindex: "tabindex", clearButton: "clearButton", preview: "preview", actionsLayout: "actionsLayout", activeView: "activeView", views: "views", gradientSettings: "gradientSettings", paletteSettings: "paletteSettings" }, outputs: { valueChange: "valueChange", cancel: "cancel", activeViewChange: "activeViewChange", clearButtonClick: "clearButtonClick", actionButtonClick: "actionButtonClick" }, host: { listeners: { "keydown.enter": "enterHandler($event)", "keydown.escape": "escapeHandler()", "focusin": "focusHandler($event)" }, properties: { "class.k-flatcolorpicker": "this.hostClasses", "class.k-coloreditor": "this.hostClasses", "class.k-disabled": "this.disabledClass", "attr.aria-disabled": "this.isDisabled", "attr.aria-readonly": "this.ariaReadonly", "attr.dir": "this.direction", "attr.tabindex": "this.hostTabindex", "attr.role": "this.ariaRole", "attr.aria-invalid": "this.isControlInvalid", "class.k-readonly": "this.readonly" } }, providers: [
|
|
557
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FlatColorPickerComponent, isStandalone: true, selector: "kendo-flatcolorpicker", inputs: { readonly: "readonly", disabled: "disabled", format: "format", value: "value", tabindex: "tabindex", clearButton: "clearButton", preview: "preview", actionsLayout: "actionsLayout", activeView: "activeView", views: "views", gradientSettings: "gradientSettings", adaptiveMode: "adaptiveMode", paletteSettings: "paletteSettings", size: "size" }, outputs: { valueChange: "valueChange", cancel: "cancel", activeViewChange: "activeViewChange", clearButtonClick: "clearButtonClick", actionButtonClick: "actionButtonClick" }, host: { listeners: { "keydown.enter": "enterHandler($event)", "keydown.escape": "escapeHandler()", "focusin": "focusHandler($event)" }, properties: { "class.k-flatcolorpicker": "this.hostClasses", "class.k-coloreditor": "this.hostClasses", "class.k-disabled": "this.disabledClass", "attr.aria-disabled": "this.isDisabled", "attr.aria-readonly": "this.ariaReadonly", "attr.dir": "this.direction", "attr.tabindex": "this.hostTabindex", "attr.role": "this.ariaRole", "attr.aria-invalid": "this.isControlInvalid", "class.k-readonly": "this.readonly" } }, providers: [
|
|
519
558
|
{
|
|
520
559
|
multi: true,
|
|
521
560
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -591,6 +630,7 @@ export class FlatColorPickerComponent {
|
|
|
591
630
|
[clearButton]="clearButton"
|
|
592
631
|
[activeView]="activeView"
|
|
593
632
|
[views]="views"
|
|
633
|
+
[size]="size"
|
|
594
634
|
[value]="value"
|
|
595
635
|
[selection]="selection"
|
|
596
636
|
[preview]="preview"
|
|
@@ -603,6 +643,8 @@ export class FlatColorPickerComponent {
|
|
|
603
643
|
[tabindex]="innerTabIndex"
|
|
604
644
|
*ngIf="activeView === 'gradient'"
|
|
605
645
|
[value]="selection"
|
|
646
|
+
[size]="size"
|
|
647
|
+
[adaptiveMode]="adaptiveMode"
|
|
606
648
|
[format]="format"
|
|
607
649
|
[opacity]="gradientSettings.opacity"
|
|
608
650
|
[delay]="gradientSettings.delay"
|
|
@@ -617,6 +659,7 @@ export class FlatColorPickerComponent {
|
|
|
617
659
|
[tabindex]="innerTabIndex"
|
|
618
660
|
*ngIf="activeView === 'palette'"
|
|
619
661
|
[palette]="paletteSettings.palette"
|
|
662
|
+
[size]="size"
|
|
620
663
|
[columns]="paletteSettings.columns"
|
|
621
664
|
[tileSize]="paletteSettings.tileSize"
|
|
622
665
|
[format]="format"
|
|
@@ -625,14 +668,16 @@ export class FlatColorPickerComponent {
|
|
|
625
668
|
(valueChange)="handleValueChange($event)"
|
|
626
669
|
></kendo-colorpalette>
|
|
627
670
|
</div>
|
|
628
|
-
<div
|
|
629
|
-
[innerTabIndex]="innerTabIndex"
|
|
630
|
-
*ngIf="preview"
|
|
671
|
+
<div *ngIf="preview && !adaptiveMode"
|
|
631
672
|
#footer
|
|
673
|
+
kendoFlatColorPickerActionButtons
|
|
674
|
+
[innerTabIndex]="innerTabIndex"
|
|
675
|
+
[size]="size"
|
|
632
676
|
[ngClass]="'k-justify-content-' + actionsLayout"
|
|
633
677
|
(actionButtonClick)="onAction($event)"
|
|
634
|
-
(tabOut)="firstFocusable.focus()"
|
|
635
|
-
|
|
678
|
+
(tabOut)="firstFocusable.focus()">
|
|
679
|
+
</div>
|
|
680
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedColorPickerMessagesDirective, selector: "[kendoColorPickerLocalizedMessages], [kendoFlatColorPickerLocalizedMessages], [kendoColorGradientLocalizedMessages], [kendoColorPaletteLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FlatColorPickerHeaderComponent, selector: "[kendoFlatColorPickerHeader]", inputs: ["clearButton", "activeView", "views", "preview", "innerTabIndex", "value", "selection", "size"], outputs: ["viewChange", "valuePaneClick", "clearButtonClick", "tabOut"] }, { kind: "component", type: ColorGradientComponent, selector: "kendo-colorgradient", inputs: ["adaptiveMode", "id", "opacity", "size", "disabled", "readonly", "clearButton", "delay", "value", "contrastTool", "tabindex", "format", "gradientSliderStep", "gradientSliderSmallStep"], outputs: ["valueChange"], exportAs: ["kendoColorGradient"] }, { kind: "component", type: ColorPaletteComponent, selector: "kendo-colorpalette", inputs: ["id", "format", "value", "columns", "palette", "size", "tabindex", "disabled", "readonly", "tileSize"], outputs: ["selectionChange", "valueChange", "cellSelection"], exportAs: ["kendoColorPalette"] }, { kind: "component", type: FlatColorPickerActionButtonsComponent, selector: "[kendoFlatColorPickerActionButtons]", inputs: ["innerTabIndex", "size"], outputs: ["actionButtonClick", "tabOut"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
636
681
|
}
|
|
637
682
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatColorPickerComponent, decorators: [{
|
|
638
683
|
type: Component,
|
|
@@ -716,6 +761,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
716
761
|
[clearButton]="clearButton"
|
|
717
762
|
[activeView]="activeView"
|
|
718
763
|
[views]="views"
|
|
764
|
+
[size]="size"
|
|
719
765
|
[value]="value"
|
|
720
766
|
[selection]="selection"
|
|
721
767
|
[preview]="preview"
|
|
@@ -728,6 +774,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
728
774
|
[tabindex]="innerTabIndex"
|
|
729
775
|
*ngIf="activeView === 'gradient'"
|
|
730
776
|
[value]="selection"
|
|
777
|
+
[size]="size"
|
|
778
|
+
[adaptiveMode]="adaptiveMode"
|
|
731
779
|
[format]="format"
|
|
732
780
|
[opacity]="gradientSettings.opacity"
|
|
733
781
|
[delay]="gradientSettings.delay"
|
|
@@ -742,6 +790,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
742
790
|
[tabindex]="innerTabIndex"
|
|
743
791
|
*ngIf="activeView === 'palette'"
|
|
744
792
|
[palette]="paletteSettings.palette"
|
|
793
|
+
[size]="size"
|
|
745
794
|
[columns]="paletteSettings.columns"
|
|
746
795
|
[tileSize]="paletteSettings.tileSize"
|
|
747
796
|
[format]="format"
|
|
@@ -750,13 +799,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
750
799
|
(valueChange)="handleValueChange($event)"
|
|
751
800
|
></kendo-colorpalette>
|
|
752
801
|
</div>
|
|
753
|
-
<div
|
|
754
|
-
[innerTabIndex]="innerTabIndex"
|
|
755
|
-
*ngIf="preview"
|
|
802
|
+
<div *ngIf="preview && !adaptiveMode"
|
|
756
803
|
#footer
|
|
804
|
+
kendoFlatColorPickerActionButtons
|
|
805
|
+
[innerTabIndex]="innerTabIndex"
|
|
806
|
+
[size]="size"
|
|
757
807
|
[ngClass]="'k-justify-content-' + actionsLayout"
|
|
758
808
|
(actionButtonClick)="onAction($event)"
|
|
759
|
-
(tabOut)="firstFocusable.focus()"
|
|
809
|
+
(tabOut)="firstFocusable.focus()">
|
|
810
|
+
</div>
|
|
760
811
|
`,
|
|
761
812
|
standalone: true,
|
|
762
813
|
imports: [LocalizedColorPickerMessagesDirective, NgIf, FlatColorPickerHeaderComponent, ColorGradientComponent, ColorPaletteComponent, FlatColorPickerActionButtonsComponent, NgClass]
|
|
@@ -825,8 +876,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
825
876
|
type: Input
|
|
826
877
|
}], gradientSettings: [{
|
|
827
878
|
type: Input
|
|
879
|
+
}], adaptiveMode: [{
|
|
880
|
+
type: Input
|
|
828
881
|
}], paletteSettings: [{
|
|
829
882
|
type: Input
|
|
883
|
+
}], size: [{
|
|
884
|
+
type: Input
|
|
830
885
|
}], valueChange: [{
|
|
831
886
|
type: Output
|
|
832
887
|
}], cancel: [{
|
|
@@ -117,8 +117,16 @@ export class ColorPickerMessages extends ComponentMessages {
|
|
|
117
117
|
* The message for the Cancel action button.
|
|
118
118
|
*/
|
|
119
119
|
cancelButton;
|
|
120
|
+
/**
|
|
121
|
+
* The title for the Close button in adaptive mode.
|
|
122
|
+
*/
|
|
123
|
+
closeButton;
|
|
124
|
+
/**
|
|
125
|
+
* The title for the ActionSheet when in adaptive mode.
|
|
126
|
+
*/
|
|
127
|
+
adaptiveTitle;
|
|
120
128
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
121
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ColorPickerMessages, selector: "kendo-colorpicker-messages-base", inputs: { colorPaletteNoColor: "colorPaletteNoColor", colorGradientNoColor: "colorGradientNoColor", flatColorPickerNoColor: "flatColorPickerNoColor", colorPickerNoColor: "colorPickerNoColor", colorGradientHandle: "colorGradientHandle", clearButton: "clearButton", hueSliderHandle: "hueSliderHandle", opacitySliderHandle: "opacitySliderHandle", hexInputPlaceholder: "hexInputPlaceholder", redInputPlaceholder: "redInputPlaceholder", greenInputPlaceholder: "greenInputPlaceholder", blueInputPlaceholder: "blueInputPlaceholder", alphaInputPlaceholder: "alphaInputPlaceholder", redChannelLabel: "redChannelLabel", greenChannelLabel: "greenChannelLabel", blueChannelLabel: "blueChannelLabel", alphaChannelLabel: "alphaChannelLabel", passContrast: "passContrast", failContrast: "failContrast", contrastRatio: "contrastRatio", previewColor: "previewColor", revertSelection: "revertSelection", gradientView: "gradientView", paletteView: "paletteView", formatButton: "formatButton", applyButton: "applyButton", cancelButton: "cancelButton" }, usesInheritance: true, ngImport: i0 });
|
|
129
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ColorPickerMessages, selector: "kendo-colorpicker-messages-base", inputs: { colorPaletteNoColor: "colorPaletteNoColor", colorGradientNoColor: "colorGradientNoColor", flatColorPickerNoColor: "flatColorPickerNoColor", colorPickerNoColor: "colorPickerNoColor", colorGradientHandle: "colorGradientHandle", clearButton: "clearButton", hueSliderHandle: "hueSliderHandle", opacitySliderHandle: "opacitySliderHandle", hexInputPlaceholder: "hexInputPlaceholder", redInputPlaceholder: "redInputPlaceholder", greenInputPlaceholder: "greenInputPlaceholder", blueInputPlaceholder: "blueInputPlaceholder", alphaInputPlaceholder: "alphaInputPlaceholder", redChannelLabel: "redChannelLabel", greenChannelLabel: "greenChannelLabel", blueChannelLabel: "blueChannelLabel", alphaChannelLabel: "alphaChannelLabel", passContrast: "passContrast", failContrast: "failContrast", contrastRatio: "contrastRatio", previewColor: "previewColor", revertSelection: "revertSelection", gradientView: "gradientView", paletteView: "paletteView", formatButton: "formatButton", applyButton: "applyButton", cancelButton: "cancelButton", closeButton: "closeButton", adaptiveTitle: "adaptiveTitle" }, usesInheritance: true, ngImport: i0 });
|
|
122
130
|
}
|
|
123
131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerMessages, decorators: [{
|
|
124
132
|
type: Directive,
|
|
@@ -180,4 +188,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
180
188
|
type: Input
|
|
181
189
|
}], cancelButton: [{
|
|
182
190
|
type: Input
|
|
191
|
+
}], closeButton: [{
|
|
192
|
+
type: Input
|
|
193
|
+
}], adaptiveTitle: [{
|
|
194
|
+
type: Input
|
|
183
195
|
}] } });
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export const animationDuration = 300;
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export const updateActionSheetAdaptiveAppearance = (actionSheet, windowSize, renderer) => {
|
|
13
|
+
const element = actionSheet['element'].nativeElement.querySelector('.k-actionsheet');
|
|
14
|
+
const animationContainer = actionSheet['element'].nativeElement.querySelector('.k-child-animation-container');
|
|
15
|
+
renderer.addClass(element, 'k-adaptive-actionsheet');
|
|
16
|
+
renderer.setStyle(animationContainer, 'width', '100%');
|
|
17
|
+
if (windowSize === 'medium') {
|
|
18
|
+
renderer.removeClass(element, 'k-actionsheet-fullscreen');
|
|
19
|
+
renderer.addClass(element, 'k-actionsheet-bottom');
|
|
20
|
+
renderer.setStyle(animationContainer, 'bottom', '0px');
|
|
21
|
+
}
|
|
22
|
+
else if (windowSize === 'small') {
|
|
23
|
+
renderer.removeClass(element, 'k-actionsheet-bottom');
|
|
24
|
+
renderer.addClass(element, 'k-actionsheet-fullscreen');
|
|
25
|
+
renderer.setStyle(animationContainer, 'height', '100%');
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -18,7 +18,7 @@ export class FlatColorPickerService {
|
|
|
18
18
|
undefined;
|
|
19
19
|
return {
|
|
20
20
|
palette: settingsPalette || defaultPreset,
|
|
21
|
-
tileSize: settings.tileSize
|
|
21
|
+
tileSize: settings.tileSize,
|
|
22
22
|
columns: settings.columns || presetColumns || 10
|
|
23
23
|
};
|
|
24
24
|
}
|
|
@@ -27,8 +27,8 @@ export class FlatColorPickerService {
|
|
|
27
27
|
return { width: tileSize, height: tileSize };
|
|
28
28
|
}
|
|
29
29
|
return {
|
|
30
|
-
width: tileSize
|
|
31
|
-
height: tileSize
|
|
30
|
+
width: tileSize?.width ? tileSize?.width : tileSize?.height,
|
|
31
|
+
height: tileSize?.height ? tileSize?.height : tileSize?.width
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatColorPickerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -7,6 +7,7 @@ import { KENDO_COLORGRADIENT, KENDO_COLORPALETTE, KENDO_COLORPICKER, KENDO_FLATC
|
|
|
7
7
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
8
8
|
import { ResizeBatchService } from '@progress/kendo-angular-common';
|
|
9
9
|
import { IconsService } from '@progress/kendo-angular-icons';
|
|
10
|
+
import { AdaptiveService } from '@progress/kendo-angular-utils';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
import * as i1 from "./colorpicker/colorpicker.component";
|
|
12
13
|
import * as i2 from "./colorpicker/localization/custom-messages.component";
|
|
@@ -21,13 +22,13 @@ import * as i5 from "./colorpicker/color-palette.component";
|
|
|
21
22
|
export class ColorPickerModule {
|
|
22
23
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
23
24
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerModule, imports: [i1.ColorPickerComponent, i2.ColorPickerCustomMessagesComponent, i3.FlatColorPickerComponent, i2.ColorPickerCustomMessagesComponent, i4.ColorGradientComponent, i2.ColorPickerCustomMessagesComponent, i5.ColorPaletteComponent, i2.ColorPickerCustomMessagesComponent], exports: [i1.ColorPickerComponent, i2.ColorPickerCustomMessagesComponent, i3.FlatColorPickerComponent, i2.ColorPickerCustomMessagesComponent, i4.ColorGradientComponent, i2.ColorPickerCustomMessagesComponent, i5.ColorPaletteComponent, i2.ColorPickerCustomMessagesComponent] });
|
|
24
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerModule, providers: [PopupService, IconsService, ResizeBatchService], imports: [i1.ColorPickerComponent, i3.FlatColorPickerComponent, i4.ColorGradientComponent] });
|
|
25
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerModule, providers: [PopupService, IconsService, ResizeBatchService, AdaptiveService], imports: [i1.ColorPickerComponent, i3.FlatColorPickerComponent, i4.ColorGradientComponent] });
|
|
25
26
|
}
|
|
26
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerModule, decorators: [{
|
|
27
28
|
type: NgModule,
|
|
28
29
|
args: [{
|
|
29
30
|
imports: [...KENDO_COLORPICKER, ...KENDO_FLATCOLORPICKER, ...KENDO_COLORGRADIENT, ...KENDO_COLORPALETTE],
|
|
30
31
|
exports: [...KENDO_COLORPICKER, ...KENDO_FLATCOLORPICKER, ...KENDO_COLORGRADIENT, ...KENDO_COLORPALETTE],
|
|
31
|
-
providers: [PopupService, IconsService, ResizeBatchService]
|
|
32
|
+
providers: [PopupService, IconsService, ResizeBatchService, AdaptiveService]
|
|
32
33
|
}]
|
|
33
34
|
}] });
|
|
@@ -8,6 +8,7 @@ import { KENDO_ADORNMENTS, ResizeBatchService } from '@progress/kendo-angular-co
|
|
|
8
8
|
import { DialogContainerService, DialogService, WindowService, WindowContainerService } from '@progress/kendo-angular-dialog';
|
|
9
9
|
import { IconsService } from '@progress/kendo-angular-icons';
|
|
10
10
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
11
|
+
import { AdaptiveService } from '@progress/kendo-angular-utils';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
import * as i1 from "./textbox/textbox.directive";
|
|
13
14
|
import * as i2 from "./textbox/textbox.component";
|
|
@@ -86,13 +87,13 @@ import * as i41 from "./otpinput/localization/custom-messages.component";
|
|
|
86
87
|
export class InputsModule {
|
|
87
88
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
88
89
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, imports: [i1.TextBoxDirective, i2.TextBoxComponent, i3.InputSeparatorComponent, i4.TextBoxSuffixTemplateDirective, i5.TextBoxPrefixTemplateDirective, i6.TextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i8.NumericTextBoxComponent, i9.NumericTextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i10.MaskedTextBoxComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i11.TextAreaComponent, i12.TextAreaDirective, i13.TextAreaPrefixComponent, i14.TextAreaSuffixComponent, i7.SeparatorComponent, i15.CheckBoxComponent, i16.CheckBoxDirective, i17.RadioButtonComponent, i18.RadioButtonDirective, i19.SwitchComponent, i20.SwitchCustomMessagesComponent, i21.FormFieldComponent, i22.HintComponent, i23.ErrorComponent, i24.SliderComponent, i25.SliderCustomMessagesComponent, i26.LabelTemplateDirective, i27.RangeSliderComponent, i28.RangeSliderCustomMessagesComponent, i26.LabelTemplateDirective, i29.RatingComponent, i30.RatingItemTemplateDirective, i31.RatingHoveredItemTemplateDirective, i32.RatingSelectedItemTemplateDirective, i33.SignatureComponent, i34.SignatureCustomMessagesComponent, i35.ColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i37.FlatColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i38.ColorGradientComponent, i36.ColorPickerCustomMessagesComponent, i39.ColorPaletteComponent, i36.ColorPickerCustomMessagesComponent, i40.OTPInputComponent, i41.OTPInputCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent], exports: [i1.TextBoxDirective, i2.TextBoxComponent, i3.InputSeparatorComponent, i4.TextBoxSuffixTemplateDirective, i5.TextBoxPrefixTemplateDirective, i6.TextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i8.NumericTextBoxComponent, i9.NumericTextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i10.MaskedTextBoxComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i11.TextAreaComponent, i12.TextAreaDirective, i13.TextAreaPrefixComponent, i14.TextAreaSuffixComponent, i7.SeparatorComponent, i15.CheckBoxComponent, i16.CheckBoxDirective, i17.RadioButtonComponent, i18.RadioButtonDirective, i19.SwitchComponent, i20.SwitchCustomMessagesComponent, i21.FormFieldComponent, i22.HintComponent, i23.ErrorComponent, i24.SliderComponent, i25.SliderCustomMessagesComponent, i26.LabelTemplateDirective, i27.RangeSliderComponent, i28.RangeSliderCustomMessagesComponent, i26.LabelTemplateDirective, i29.RatingComponent, i30.RatingItemTemplateDirective, i31.RatingHoveredItemTemplateDirective, i32.RatingSelectedItemTemplateDirective, i33.SignatureComponent, i34.SignatureCustomMessagesComponent, i35.ColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i37.FlatColorPickerComponent, i36.ColorPickerCustomMessagesComponent, i38.ColorGradientComponent, i36.ColorPickerCustomMessagesComponent, i39.ColorPaletteComponent, i36.ColorPickerCustomMessagesComponent, i40.OTPInputComponent, i41.OTPInputCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent] });
|
|
89
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [i2.TextBoxComponent, i7.SeparatorComponent, i8.NumericTextBoxComponent, i7.SeparatorComponent, i7.SeparatorComponent, i7.SeparatorComponent, i24.SliderComponent, i27.RangeSliderComponent, i29.RatingComponent, i33.SignatureComponent, i35.ColorPickerComponent, i37.FlatColorPickerComponent, i38.ColorGradientComponent, i40.OTPInputComponent, i7.SeparatorComponent] });
|
|
90
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService, AdaptiveService], imports: [i2.TextBoxComponent, i7.SeparatorComponent, i8.NumericTextBoxComponent, i7.SeparatorComponent, i7.SeparatorComponent, i7.SeparatorComponent, i24.SliderComponent, i27.RangeSliderComponent, i29.RatingComponent, i33.SignatureComponent, i35.ColorPickerComponent, i37.FlatColorPickerComponent, i38.ColorGradientComponent, i40.OTPInputComponent, i7.SeparatorComponent] });
|
|
90
91
|
}
|
|
91
92
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, decorators: [{
|
|
92
93
|
type: NgModule,
|
|
93
94
|
args: [{
|
|
94
95
|
imports: [...KENDO_INPUTS, ...KENDO_ADORNMENTS],
|
|
95
96
|
exports: [...KENDO_INPUTS, ...KENDO_ADORNMENTS],
|
|
96
|
-
providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService]
|
|
97
|
+
providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService, AdaptiveService]
|
|
97
98
|
}]
|
|
98
99
|
}] });
|