@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.
Files changed (33) hide show
  1. package/colorpicker/adaptiveness/adaptive-close-button.component.d.ts +20 -0
  2. package/colorpicker/adaptiveness/adaptive-renderer.component.d.ts +38 -0
  3. package/colorpicker/color-gradient-text-label.directive.d.ts +19 -0
  4. package/colorpicker/color-gradient.component.d.ts +19 -1
  5. package/colorpicker/color-input.component.d.ts +15 -3
  6. package/colorpicker/color-palette.component.d.ts +16 -6
  7. package/colorpicker/colorpicker.component.d.ts +55 -8
  8. package/colorpicker/flatcolorpicker-actions.component.d.ts +3 -1
  9. package/colorpicker/flatcolorpicker-header.component.d.ts +3 -1
  10. package/colorpicker/flatcolorpicker.component.d.ts +19 -1
  11. package/colorpicker/localization/messages.d.ts +9 -1
  12. package/colorpicker/models/adaptive-mode.d.ts +23 -0
  13. package/esm2022/colorpicker/adaptiveness/adaptive-close-button.component.mjs +62 -0
  14. package/esm2022/colorpicker/adaptiveness/adaptive-renderer.component.mjs +205 -0
  15. package/esm2022/colorpicker/color-gradient-text-label.directive.mjs +34 -0
  16. package/esm2022/colorpicker/color-gradient.component.mjs +75 -17
  17. package/esm2022/colorpicker/color-input.component.mjs +56 -23
  18. package/esm2022/colorpicker/color-palette.component.mjs +45 -15
  19. package/esm2022/colorpicker/colorpicker.component.mjs +182 -41
  20. package/esm2022/colorpicker/flatcolorpicker-actions.component.mjs +22 -7
  21. package/esm2022/colorpicker/flatcolorpicker-header.component.mjs +8 -3
  22. package/esm2022/colorpicker/flatcolorpicker.component.mjs +72 -17
  23. package/esm2022/colorpicker/localization/messages.mjs +13 -1
  24. package/esm2022/colorpicker/models/adaptive-mode.mjs +27 -0
  25. package/esm2022/colorpicker/services/flatcolorpicker.service.mjs +3 -3
  26. package/esm2022/colorpicker.module.mjs +3 -2
  27. package/esm2022/inputs.module.mjs +3 -2
  28. package/esm2022/otpinput/otpinput.component.mjs +75 -45
  29. package/esm2022/package-metadata.mjs +2 -2
  30. package/fesm2022/progress-kendo-angular-inputs.mjs +9170 -8497
  31. package/otpinput/models/separator-icon.d.ts +9 -3
  32. package/otpinput/otpinput.component.d.ts +4 -7
  33. package/package.json +13 -11
@@ -9,8 +9,10 @@ import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
9
9
  import { Subscription } from 'rxjs';
10
10
  import { FlatColorPickerComponent } from './flatcolorpicker.component';
11
11
  import { PopupService } from '@progress/kendo-angular-popup';
12
+ import { ButtonComponent } from '@progress/kendo-angular-buttons';
13
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
12
14
  import { validatePackage } from '@progress/kendo-licensing';
13
- import { Keys, KendoInput, isChanged, closest, guid } from '@progress/kendo-angular-common';
15
+ import { Keys, KendoInput, isChanged, closest, guid, ResizeSensorComponent, isDocumentAvailable } from '@progress/kendo-angular-common';
14
16
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
15
17
  import { packageMetadata } from '../package-metadata';
16
18
  import { PALETTEPRESETS } from './models';
@@ -24,10 +26,12 @@ import { parseCSSClassNames } from '@progress/kendo-angular-common';
24
26
  import { caretAltDownIcon } from '@progress/kendo-svg-icons';
25
27
  import { NgClass, NgIf } from '@angular/common';
26
28
  import { LocalizedColorPickerMessagesDirective } from './localization/localized-colorpicker-messages.directive';
27
- import { ButtonComponent } from '@progress/kendo-angular-buttons';
29
+ import { updateActionSheetAdaptiveAppearance } from './models/adaptive-mode';
30
+ import { AdaptiveRendererComponent } from './adaptiveness/adaptive-renderer.component';
28
31
  import * as i0 from "@angular/core";
29
32
  import * as i1 from "@progress/kendo-angular-popup";
30
33
  import * as i2 from "@progress/kendo-angular-l10n";
34
+ import * as i3 from "@progress/kendo-angular-utils";
31
35
  const DOM_FOCUS_EVENTS = ['focus', 'blur'];
32
36
  const DEFAULT_SIZE = 'medium';
33
37
  const DEFAULT_ROUNDED = 'medium';
@@ -50,6 +54,7 @@ export class ColorPickerComponent {
50
54
  ngZone;
51
55
  renderer;
52
56
  injector;
57
+ adaptiveService;
53
58
  hostClasses = true;
54
59
  get focusedClass() {
55
60
  return this.isFocused;
@@ -90,6 +95,10 @@ export class ColorPickerComponent {
90
95
  get view() {
91
96
  return (this.views && this.views.length > 0) ? this.views[0] : null;
92
97
  }
98
+ /**
99
+ * Enables or disables the adaptive mode. By default, adaptive rendering is disabled.
100
+ */
101
+ adaptiveMode = 'none';
93
102
  /**
94
103
  * Sets the initially active view in the popup. The property supports two-way binding.
95
104
  *
@@ -284,13 +293,13 @@ export class ColorPickerComponent {
284
293
  */
285
294
  valueChange = new EventEmitter();
286
295
  /**
287
- * Fires each time the popup is about to open.
288
- * This event is preventable. If you cancel it, the popup will remain closed.
296
+ * Fires each time the Popup (or ActionSheet in adaptive mode) is about to open.
297
+ * This event is preventable. If you cancel it, the Popup (or the ActionSheet) will remain closed.
289
298
  */
290
299
  open = new EventEmitter();
291
300
  /**
292
- * Fires each time the popup is about to close.
293
- * This event is preventable. If you cancel it, the popup will remain open.
301
+ * Fires each time the Popup (or ActionSheet in adaptive mode) is about to close.
302
+ * This event is preventable. If you cancel it, the Popup (or the ActionSheet) will remain open.
294
303
  */
295
304
  close = new EventEmitter();
296
305
  /**
@@ -329,10 +338,14 @@ export class ColorPickerComponent {
329
338
  */
330
339
  isFocused = false;
331
340
  /**
332
- * Indicates whether the ColorPicker popup is open.
341
+ * @hidden
342
+ */
343
+ windowSize = 'large';
344
+ /**
345
+ * Returns the current open state. Returns `true` if the Popup (or ActionSheet in adaptive mode) is currently open.
333
346
  */
334
347
  get isOpen() {
335
- return isPresent(this.popupRef);
348
+ return isPresent(this.popupRef) || this.isActionSheetExpanded;
336
349
  }
337
350
  /**
338
351
  * @hidden
@@ -347,6 +360,30 @@ export class ColorPickerComponent {
347
360
  }
348
361
  return '';
349
362
  }
363
+ /**
364
+ * @hidden
365
+ */
366
+ get isAdaptiveModeEnabled() {
367
+ return this.adaptiveMode === 'auto';
368
+ }
369
+ /**
370
+ * @hidden
371
+ */
372
+ get isAdaptive() {
373
+ return this.isAdaptiveModeEnabled && this.windowSize !== 'large';
374
+ }
375
+ /**
376
+ * @hidden
377
+ */
378
+ get actionSheet() {
379
+ return this.adaptiveRenderer?.actionSheet;
380
+ }
381
+ /**
382
+ * @hidden
383
+ */
384
+ get isActionSheetExpanded() {
385
+ return Boolean(this.actionSheet?.expanded);
386
+ }
350
387
  /**
351
388
  * @hidden
352
389
  */
@@ -365,6 +402,10 @@ export class ColorPickerComponent {
365
402
  activeColor;
366
403
  popupTemplate;
367
404
  flatColorPicker;
405
+ /**
406
+ * @hidden
407
+ */
408
+ adaptiveRenderer;
368
409
  /**
369
410
  * @hidden
370
411
  */
@@ -384,7 +425,7 @@ export class ColorPickerComponent {
384
425
  popupSubs = new Subscription();
385
426
  colorPickerId;
386
427
  control;
387
- constructor(host, popupService, cdr, localizationService, ngZone, renderer, injector) {
428
+ constructor(host, popupService, cdr, localizationService, ngZone, renderer, injector, adaptiveService) {
388
429
  this.host = host;
389
430
  this.popupService = popupService;
390
431
  this.cdr = cdr;
@@ -392,6 +433,7 @@ export class ColorPickerComponent {
392
433
  this.ngZone = ngZone;
393
434
  this.renderer = renderer;
394
435
  this.injector = injector;
436
+ this.adaptiveService = adaptiveService;
395
437
  validatePackage(packageMetadata);
396
438
  this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
397
439
  this.direction = rtl ? 'rtl' : 'ltr';
@@ -406,7 +448,7 @@ export class ColorPickerComponent {
406
448
  undefined;
407
449
  this._paletteSettings = {
408
450
  palette: settingsPalette || defaultPreset,
409
- tileSize: this._paletteSettings.tileSize || 24,
451
+ tileSize: this._paletteSettings.tileSize,
410
452
  columns: this._paletteSettings.columns || presetColumns || 10
411
453
  };
412
454
  this.handleHostId();
@@ -420,6 +462,12 @@ export class ColorPickerComponent {
420
462
  });
421
463
  this.setHostElementAriaLabel();
422
464
  this.initDomEvents();
465
+ this.windowSize = this.adaptiveService.size;
466
+ if (this.actionSheet && isDocumentAvailable()) {
467
+ // The following syntax is used as it does not violate CSP compliance
468
+ this.actionSheet.element.nativeElement.style.setProperty('--kendo-actionsheet-height', '60vh');
469
+ this.actionSheet.element.nativeElement.style.setProperty('--kendo-actionsheet-max-height', 'none');
470
+ }
423
471
  }
424
472
  ngOnChanges(changes) {
425
473
  if (changes.format && changes.format.currentValue === 'name') {
@@ -441,6 +489,18 @@ export class ColorPickerComponent {
441
489
  this.subscriptions.unsubscribe();
442
490
  this.handleDomEvents('remove', DOM_FOCUS_EVENTS);
443
491
  }
492
+ /**
493
+ * @hidden
494
+ */
495
+ onResize() {
496
+ const currentWindowSize = this.adaptiveService.size;
497
+ if (this.isAdaptiveModeEnabled && this.windowSize !== currentWindowSize) {
498
+ if (this.isOpen) {
499
+ this.toggleWithEvents(false);
500
+ }
501
+ this.windowSize = currentWindowSize;
502
+ }
503
+ }
444
504
  /**
445
505
  * @hidden
446
506
  */
@@ -451,8 +511,10 @@ export class ColorPickerComponent {
451
511
  * @hidden
452
512
  */
453
513
  togglePopup() {
454
- this.focus();
455
- this.toggleWithEvents(!this.isOpen);
514
+ if (!this.isActionSheetExpanded) {
515
+ this.focus();
516
+ this.toggleWithEvents(!this.isOpen);
517
+ }
456
518
  }
457
519
  /**
458
520
  * @hidden
@@ -470,7 +532,9 @@ export class ColorPickerComponent {
470
532
  }
471
533
  return;
472
534
  }
473
- this.toggleWithEvents(!this.isOpen);
535
+ if (!this.isActionSheetExpanded) {
536
+ this.toggleWithEvents(!this.isOpen);
537
+ }
474
538
  }
475
539
  /**
476
540
  * Focuses the wrapper of the ColorPicker.
@@ -503,13 +567,15 @@ export class ColorPickerComponent {
503
567
  * @hidden
504
568
  */
505
569
  handleWrapperBlur() {
506
- if (this.isOpen) {
507
- return;
570
+ if (!this.isActionSheetExpanded) {
571
+ if (this.isOpen) {
572
+ return;
573
+ }
574
+ this.ngZone.run(() => {
575
+ this.onBlur.emit();
576
+ this.isFocused = false;
577
+ });
508
578
  }
509
- this.ngZone.run(() => {
510
- this.onBlur.emit();
511
- this.isFocused = false;
512
- });
513
579
  }
514
580
  /**
515
581
  * Clears the value of the ColorPicker.
@@ -523,20 +589,31 @@ export class ColorPickerComponent {
523
589
  this.notifyNgChanged(undefined);
524
590
  }
525
591
  /**
526
- * Toggles the popup of the ColorPicker.
592
+ * Toggles the Popup (or ActionSheet in adaptive mode) of the ColorPicker.
527
593
  * Does not trigger the `open` and `close` events of the component.
528
594
  *
529
595
  * @param open An optional parameter. Specifies whether the popup will be opened or closed.
530
596
  */
531
597
  toggle(open) {
598
+ this.windowSize = this.adaptiveService.size;
532
599
  if (this.disabled || this.readonly) {
533
600
  return;
534
601
  }
535
602
  this.cdr.markForCheck();
536
- this.closePopup();
603
+ if (this.isActionSheetExpanded) {
604
+ this.closeActionSheet();
605
+ }
606
+ else {
607
+ this.closePopup();
608
+ }
537
609
  open = isPresent(open) ? open : !this.isOpen;
538
610
  if (open) {
539
- this.openPopup();
611
+ if (this.isAdaptive && !this.isActionSheetExpanded) {
612
+ this.openActionSheet();
613
+ }
614
+ else {
615
+ this.openPopup();
616
+ }
540
617
  this.focusFirstElement();
541
618
  }
542
619
  }
@@ -557,13 +634,15 @@ export class ColorPickerComponent {
557
634
  * @hidden
558
635
  */
559
636
  handlePopupBlur(event) {
560
- if (this.popupBlurInvalid(event)) {
561
- return;
637
+ if (!this.isActionSheetExpanded) {
638
+ if (this.popupBlurInvalid(event)) {
639
+ return;
640
+ }
641
+ this.isFocused = false;
642
+ this.onBlur.emit();
643
+ this.notifyNgTouched();
644
+ this.toggleWithEvents(false);
562
645
  }
563
- this.isFocused = false;
564
- this.onBlur.emit();
565
- this.notifyNgTouched();
566
- this.toggleWithEvents(false);
567
646
  }
568
647
  /**
569
648
  * @hidden
@@ -601,6 +680,20 @@ export class ColorPickerComponent {
601
680
  });
602
681
  }
603
682
  }
683
+ /**
684
+ * @hidden
685
+ */
686
+ onApply() {
687
+ this.handleValueChange(this.flatColorPicker.selection);
688
+ this.toggleWithEvents(false);
689
+ }
690
+ /**
691
+ * @hidden
692
+ */
693
+ onCancel(e) {
694
+ this.flatColorPicker.resetSelection(e);
695
+ this.toggleWithEvents(false);
696
+ }
604
697
  /**
605
698
  * @hidden
606
699
  */
@@ -640,7 +733,7 @@ export class ColorPickerComponent {
640
733
  }
641
734
  }
642
735
  popupBlurInvalid(ev) {
643
- const focusInFlatColorPickerElement = this.popupRef.popupElement.contains(ev.relatedTarget);
736
+ const focusInFlatColorPickerElement = this.popupRef?.popupElement?.contains(ev.relatedTarget);
644
737
  const hostClicked = closest(ev.relatedTarget, (element) => element === this.host.nativeElement);
645
738
  return Boolean(hostClicked || focusInFlatColorPickerElement);
646
739
  }
@@ -675,6 +768,15 @@ export class ColorPickerComponent {
675
768
  }
676
769
  });
677
770
  }
771
+ openActionSheet() {
772
+ this.windowSize = this.adaptiveService.size;
773
+ this.actionSheet.toggle(true);
774
+ updateActionSheetAdaptiveAppearance(this.actionSheet, this.windowSize, this.renderer);
775
+ }
776
+ closeActionSheet() {
777
+ this.actionSheet.toggle(false);
778
+ this.focus();
779
+ }
678
780
  openPopup() {
679
781
  const horizontalAlign = this.direction === "rtl" ? "right" : "left";
680
782
  const anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
@@ -716,7 +818,7 @@ export class ColorPickerComponent {
716
818
  }
717
819
  get lastFocusableElement() {
718
820
  if (this.preview) {
719
- return this.flatColorPicker.footer.lastButton;
821
+ return this.flatColorPicker.footer?.lastButton || this.adaptiveRenderer.applyButton.nativeElement;
720
822
  }
721
823
  if (this.flatColorPicker.palette) {
722
824
  return this.flatColorPicker.palette.host;
@@ -748,7 +850,9 @@ export class ColorPickerComponent {
748
850
  closest(event.relatedTarget, (element) => element === this.flatColorPicker.host.nativeElement) :
749
851
  false;
750
852
  const closestWrapper = closest(event.relatedTarget, (element) => element === this.host.nativeElement);
751
- if (!closestPopup && !closestWrapper) {
853
+ const closestActionSheet = this.isActionSheetExpanded ? closest(event.relatedTarget, (element) => element === this.actionSheet.element.nativeElement) :
854
+ false;
855
+ if (!closestPopup && !closestWrapper && !closestActionSheet) {
752
856
  this.handleWrapperBlur();
753
857
  }
754
858
  }));
@@ -758,7 +862,7 @@ export class ColorPickerComponent {
758
862
  }));
759
863
  this.subscriptions.add(this.renderer.listen(hostElement, 'click', (event) => {
760
864
  this.ngZone.run(() => {
761
- this.handleWrapperClick(event);
865
+ !this.isActionSheetExpanded && this.handleWrapperClick(event);
762
866
  });
763
867
  }));
764
868
  });
@@ -776,8 +880,8 @@ export class ColorPickerComponent {
776
880
  this.focusableId = id;
777
881
  }
778
882
  }
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: [{
883
+ 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 }, { token: i3.AdaptiveService }], target: i0.ɵɵFactoryTarget.Component });
884
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColorPickerComponent, isStandalone: true, selector: "kendo-colorpicker", inputs: { views: "views", view: "view", adaptiveMode: "adaptiveMode", 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
885
  multi: true,
782
886
  provide: NG_VALUE_ACCESSOR,
783
887
  useExisting: forwardRef(() => ColorPickerComponent)
@@ -794,7 +898,7 @@ export class ColorPickerComponent {
794
898
  provide: L10N_PREFIX,
795
899
  useValue: 'kendo.colorpicker'
796
900
  }
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: `
901
+ ], 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 }, { propertyName: "adaptiveRenderer", first: true, predicate: AdaptiveRendererComponent, descendants: true }], exportAs: ["kendoColorPicker"], usesOnChanges: true, ngImport: i0, template: `
798
902
  <ng-container kendoColorPickerLocalizedMessages
799
903
  i18n-colorPickerNoColor="kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty."
800
904
  colorPickerNoColor="Colorpicker no color chosen"
@@ -828,6 +932,10 @@ export class ColorPickerComponent {
828
932
  applyButton="Apply"
829
933
  i18n-cancelButton="kendo.colorpicker.cancelButton|The message for the Cancel action button."
830
934
  cancelButton="Cancel"
935
+ i18n-closeButton="kendo.colorpicker.closeButton|The title for the Close button."
936
+ closeButton="Close"
937
+ i18n-adaptiveTitle="kendo.colorpicker.adaptiveTitle|The title for the ActionSheet when in adaptive mode."
938
+ adaptiveTitle="Choose Color"
831
939
  i18n-redChannelLabel="kendo.colorpicker.redChannelLabel|The label of the NumericTextBox representing the red color channel."
832
940
  redChannelLabel="Red channel"
833
941
  i18n-greenChannelLabel="kendo.colorpicker.greenChannelLabel|The label of the NumericTextBox representing the green color channel."
@@ -860,13 +968,13 @@ export class ColorPickerComponent {
860
968
  </kendo-icon-wrapper>
861
969
  <span class="k-color-preview-mask" [style.background-color]="value"></span>
862
970
  </span>
863
-
864
971
  </span>
865
972
  <button
866
973
  kendoButton
867
974
  tabindex="-1"
868
975
  type="button"
869
976
  icon="caret-alt-down"
977
+ [size]="size"
870
978
  [svgIcon]="arrowDownIcon"
871
979
  [fillMode]="fillMode"
872
980
  [disabled]="disabled"
@@ -880,9 +988,11 @@ export class ColorPickerComponent {
880
988
  #flatColorPicker
881
989
  [value]="value"
882
990
  [format]="format"
991
+ [size]="isAdaptive ? 'large' : size"
883
992
  [views]="views"
884
993
  [activeView]="activeView"
885
994
  [actionsLayout]="actionsLayout"
995
+ [adaptiveMode]="isActionSheetExpanded"
886
996
  [preview]="preview"
887
997
  [gradientSettings]="gradientSettings"
888
998
  [paletteSettings]="paletteSettings"
@@ -897,7 +1007,17 @@ export class ColorPickerComponent {
897
1007
  </kendo-flatcolorpicker>
898
1008
  </ng-template>
899
1009
  <ng-container #container></ng-container>
900
- `, 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"] }] });
1010
+ <kendo-adaptive-renderer
1011
+ [actionSheetTemplate]="popupTemplate"
1012
+ [isActionSheetExpanded]="isActionSheetExpanded"
1013
+ [preview]="preview"
1014
+ (actionSheetClose)="onCancel($event)"
1015
+ (onApply)="onApply()"
1016
+ (onCancel)="onCancel($event)"
1017
+ >
1018
+ </kendo-adaptive-renderer>
1019
+ <kendo-resize-sensor *ngIf="isOpen || isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
1020
+ `, 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", "adaptiveMode", "paletteSettings", "size"], outputs: ["valueChange", "cancel", "activeViewChange", "clearButtonClick", "actionButtonClick"], exportAs: ["kendoFlatColorPicker"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: AdaptiveRendererComponent, selector: "kendo-adaptive-renderer", inputs: ["title", "subtitle", "actionSheetTemplate", "isActionSheetExpanded", "preview"], outputs: ["actionSheetClose", "onExpand", "onCollapse", "onApply", "onCancel"] }] });
901
1021
  }
902
1022
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPickerComponent, decorators: [{
903
1023
  type: Component,
@@ -955,6 +1075,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
955
1075
  applyButton="Apply"
956
1076
  i18n-cancelButton="kendo.colorpicker.cancelButton|The message for the Cancel action button."
957
1077
  cancelButton="Cancel"
1078
+ i18n-closeButton="kendo.colorpicker.closeButton|The title for the Close button."
1079
+ closeButton="Close"
1080
+ i18n-adaptiveTitle="kendo.colorpicker.adaptiveTitle|The title for the ActionSheet when in adaptive mode."
1081
+ adaptiveTitle="Choose Color"
958
1082
  i18n-redChannelLabel="kendo.colorpicker.redChannelLabel|The label of the NumericTextBox representing the red color channel."
959
1083
  redChannelLabel="Red channel"
960
1084
  i18n-greenChannelLabel="kendo.colorpicker.greenChannelLabel|The label of the NumericTextBox representing the green color channel."
@@ -987,13 +1111,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
987
1111
  </kendo-icon-wrapper>
988
1112
  <span class="k-color-preview-mask" [style.background-color]="value"></span>
989
1113
  </span>
990
-
991
1114
  </span>
992
1115
  <button
993
1116
  kendoButton
994
1117
  tabindex="-1"
995
1118
  type="button"
996
1119
  icon="caret-alt-down"
1120
+ [size]="size"
997
1121
  [svgIcon]="arrowDownIcon"
998
1122
  [fillMode]="fillMode"
999
1123
  [disabled]="disabled"
@@ -1007,9 +1131,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1007
1131
  #flatColorPicker
1008
1132
  [value]="value"
1009
1133
  [format]="format"
1134
+ [size]="isAdaptive ? 'large' : size"
1010
1135
  [views]="views"
1011
1136
  [activeView]="activeView"
1012
1137
  [actionsLayout]="actionsLayout"
1138
+ [adaptiveMode]="isActionSheetExpanded"
1013
1139
  [preview]="preview"
1014
1140
  [gradientSettings]="gradientSettings"
1015
1141
  [paletteSettings]="paletteSettings"
@@ -1024,11 +1150,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1024
1150
  </kendo-flatcolorpicker>
1025
1151
  </ng-template>
1026
1152
  <ng-container #container></ng-container>
1027
- `,
1153
+ <kendo-adaptive-renderer
1154
+ [actionSheetTemplate]="popupTemplate"
1155
+ [isActionSheetExpanded]="isActionSheetExpanded"
1156
+ [preview]="preview"
1157
+ (actionSheetClose)="onCancel($event)"
1158
+ (onApply)="onApply()"
1159
+ (onCancel)="onCancel($event)"
1160
+ >
1161
+ </kendo-adaptive-renderer>
1162
+ <kendo-resize-sensor *ngIf="isOpen || isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
1163
+ `,
1028
1164
  standalone: true,
1029
- imports: [LocalizedColorPickerMessagesDirective, NgClass, NgIf, IconWrapperComponent, ButtonComponent, FlatColorPickerComponent]
1165
+ imports: [LocalizedColorPickerMessagesDirective, NgClass, NgIf, IconWrapperComponent, ButtonComponent, FlatColorPickerComponent, ResizeSensorComponent, AdaptiveRendererComponent]
1030
1166
  }]
1031
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.PopupService }, { type: i0.ChangeDetectorRef }, { type: i2.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.Injector }]; }, propDecorators: { hostClasses: [{
1167
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.PopupService }, { type: i0.ChangeDetectorRef }, { type: i2.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i3.AdaptiveService }]; }, propDecorators: { hostClasses: [{
1032
1168
  type: HostBinding,
1033
1169
  args: ['class.k-colorpicker']
1034
1170
  }, {
@@ -1071,6 +1207,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1071
1207
  type: Input
1072
1208
  }], view: [{
1073
1209
  type: Input
1210
+ }], adaptiveMode: [{
1211
+ type: Input
1074
1212
  }], activeView: [{
1075
1213
  type: Input
1076
1214
  }], readonly: [{
@@ -1142,4 +1280,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1142
1280
  }], flatColorPicker: [{
1143
1281
  type: ViewChild,
1144
1282
  args: ['flatColorPicker', { static: false }]
1283
+ }], adaptiveRenderer: [{
1284
+ type: ViewChild,
1285
+ args: [AdaptiveRendererComponent]
1145
1286
  }] } });
@@ -4,6 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Component, HostBinding, EventEmitter, Output, ElementRef, ViewChild, Input } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
+ import { ButtonComponent } from '@progress/kendo-angular-buttons';
7
8
  import * as i0 from "@angular/core";
8
9
  import * as i1 from "@progress/kendo-angular-l10n";
9
10
  /**
@@ -13,6 +14,7 @@ export class FlatColorPickerActionButtonsComponent {
13
14
  localizationService;
14
15
  hostClasses = true;
15
16
  innerTabIndex = -1;
17
+ size;
16
18
  actionButtonClick = new EventEmitter();
17
19
  tabOut = new EventEmitter();
18
20
  firstButton;
@@ -31,23 +33,28 @@ export class FlatColorPickerActionButtonsComponent {
31
33
  this.actionButtonClick.emit(args);
32
34
  }
33
35
  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: `
36
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FlatColorPickerActionButtonsComponent, isStandalone: true, selector: "[kendoFlatColorPickerActionButtons]", inputs: { innerTabIndex: "innerTabIndex", size: "size" }, 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: `
35
37
  <button #first
36
- class="k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base"
38
+ kendoButton
39
+ class="k-coloreditor-cancel"
40
+ [size]="size"
37
41
  [attr.title]="getText('cancelButton')"
38
42
  (click)="onActionButtonClick('cancel', $event)"
39
43
  type="button"
40
44
  [tabindex]="innerTabIndex.toString()"
41
45
  >{{getText('cancelButton')}}</button>
42
46
  <button #last
43
- class="k-coloreditor-apply k-button k-button-md k-button-solid k-button-solid-primary"
47
+ kendoButton
48
+ themeColor="primary"
49
+ [size]="size"
50
+ class="k-coloreditor-apply"
44
51
  [attr.title]="getText('applyButton')"
45
52
  (click)="onActionButtonClick('apply', $event)"
46
53
  type="button"
47
54
  [tabindex]="innerTabIndex.toString()"
48
55
  (keydown.tab)="$event.preventDefault(); tabOut.emit();"
49
56
  >{{getText('applyButton')}}</button>
50
- `, isInline: true });
57
+ `, 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"] }] });
51
58
  }
52
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatColorPickerActionButtonsComponent, decorators: [{
53
60
  type: Component,
@@ -56,14 +63,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
56
63
  selector: '[kendoFlatColorPickerActionButtons]',
57
64
  template: `
58
65
  <button #first
59
- class="k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base"
66
+ kendoButton
67
+ class="k-coloreditor-cancel"
68
+ [size]="size"
60
69
  [attr.title]="getText('cancelButton')"
61
70
  (click)="onActionButtonClick('cancel', $event)"
62
71
  type="button"
63
72
  [tabindex]="innerTabIndex.toString()"
64
73
  >{{getText('cancelButton')}}</button>
65
74
  <button #last
66
- class="k-coloreditor-apply k-button k-button-md k-button-solid k-button-solid-primary"
75
+ kendoButton
76
+ themeColor="primary"
77
+ [size]="size"
78
+ class="k-coloreditor-apply"
67
79
  [attr.title]="getText('applyButton')"
68
80
  (click)="onActionButtonClick('apply', $event)"
69
81
  type="button"
@@ -71,7 +83,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
71
83
  (keydown.tab)="$event.preventDefault(); tabOut.emit();"
72
84
  >{{getText('applyButton')}}</button>
73
85
  `,
74
- standalone: true
86
+ standalone: true,
87
+ imports: [ButtonComponent]
75
88
  }]
76
89
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { hostClasses: [{
77
90
  type: HostBinding,
@@ -84,6 +97,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
84
97
  args: ['class.k-actions-horizontal']
85
98
  }], innerTabIndex: [{
86
99
  type: Input
100
+ }], size: [{
101
+ type: Input
87
102
  }], actionButtonClick: [{
88
103
  type: Output
89
104
  }], tabOut: [{