@progress/kendo-angular-inputs 8.0.0-dev.202201101634 → 8.0.0-dev.202201121416

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 (28) hide show
  1. package/dist/cdn/js/kendo-angular-inputs.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/colorpicker/color-gradient.component.js +3 -0
  4. package/dist/es/colorpicker/color-palette.component.js +6 -3
  5. package/dist/es/colorpicker/colorpicker.component.js +188 -48
  6. package/dist/es/colorpicker/flatcolorpicker.component.js +7 -4
  7. package/dist/es/package-metadata.js +1 -1
  8. package/dist/es/radiobutton/radiobutton.directive.js +3 -0
  9. package/dist/es2015/colorpicker/color-gradient.component.js +3 -0
  10. package/dist/es2015/colorpicker/color-palette.component.d.ts +1 -1
  11. package/dist/es2015/colorpicker/color-palette.component.js +6 -3
  12. package/dist/es2015/colorpicker/colorpicker.component.d.ts +18 -6
  13. package/dist/es2015/colorpicker/colorpicker.component.js +167 -69
  14. package/dist/es2015/colorpicker/flatcolorpicker.component.d.ts +2 -2
  15. package/dist/es2015/colorpicker/flatcolorpicker.component.js +7 -4
  16. package/dist/es2015/index.metadata.json +1 -1
  17. package/dist/es2015/package-metadata.js +1 -1
  18. package/dist/es2015/radiobutton/radiobutton.directive.js +3 -0
  19. package/dist/fesm2015/index.js +204 -104
  20. package/dist/fesm5/index.js +228 -86
  21. package/dist/npm/colorpicker/color-gradient.component.js +3 -0
  22. package/dist/npm/colorpicker/color-palette.component.js +6 -3
  23. package/dist/npm/colorpicker/colorpicker.component.js +187 -47
  24. package/dist/npm/colorpicker/flatcolorpicker.component.js +7 -4
  25. package/dist/npm/package-metadata.js +1 -1
  26. package/dist/npm/radiobutton/radiobutton.directive.js +3 -0
  27. package/dist/systemjs/kendo-angular-inputs.js +1 -1
  28. package/package.json +1 -1
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-inputs',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1641832234,
12
+ publishDate: 1641996688,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -4,7 +4,9 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
6
  import { Directive, ElementRef, HostBinding, Input, Renderer2 } from '@angular/core';
7
+ import { validatePackage } from '@progress/kendo-licensing';
7
8
  import { getStylingClasses } from '../common/utils';
9
+ import { packageMetadata } from '../package-metadata';
8
10
  /**
9
11
  * Represents the directive that renders the [Kendo UI RadioButton]({% slug overview_checkbox %}) input component.
10
12
  * The directive is placed on input type="radio" elements.
@@ -20,6 +22,7 @@ let RadioButtonDirective = class RadioButtonDirective {
20
22
  this.hostElement = hostElement;
21
23
  this.kendoClass = true;
22
24
  this._size = 'medium';
25
+ validatePackage(packageMetadata);
23
26
  }
24
27
  /**
25
28
  * The size property specifies the width and height of the RadioButton
@@ -8,7 +8,7 @@ import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, RadioControlValueAccessor
8
8
  import { Subscription, fromEvent, interval, merge, BehaviorSubject, Subject } from 'rxjs';
9
9
  import { take, filter, concatMap, startWith, takeUntil, skip, debounceTime, throttleTime } from 'rxjs/operators';
10
10
  import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages, MessageService } from '@progress/kendo-angular-l10n';
11
- import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent } from '@progress/kendo-angular-common';
11
+ import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent, closest } from '@progress/kendo-angular-common';
12
12
  import { validatePackage } from '@progress/kendo-licensing';
13
13
  import { browser, mobileOS, detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
14
14
  import { IntlService } from '@progress/kendo-angular-intl';
@@ -482,7 +482,7 @@ const containsFocus = (hostElement, contender) => hostElement && contender && (h
482
482
  /**
483
483
  * @hidden
484
484
  */
485
- const closest = (node, predicate) => {
485
+ const closest$1 = (node, predicate) => {
486
486
  while (node && !predicate(node)) {
487
487
  node = node.parentNode;
488
488
  }
@@ -496,7 +496,7 @@ const packageMetadata = {
496
496
  name: '@progress/kendo-angular-inputs',
497
497
  productName: 'Kendo UI for Angular',
498
498
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
499
- publishDate: 1641832234,
499
+ publishDate: 1641996688,
500
500
  version: '',
501
501
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
502
502
  };
@@ -6037,7 +6037,7 @@ let TextBoxComponent = TextBoxComponent_1 = class TextBoxComponent {
6037
6037
  return;
6038
6038
  }
6039
6039
  if (tabbing) {
6040
- const closestTextbox = closest(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
6040
+ const closestTextbox = closest$1(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
6041
6041
  if (!closestTextbox) {
6042
6042
  this.handleBlur();
6043
6043
  }
@@ -7031,7 +7031,7 @@ let TextAreaComponent = TextAreaComponent_1 = class TextAreaComponent extends Te
7031
7031
  return;
7032
7032
  }
7033
7033
  if (tabbing) {
7034
- const closestTextbox = closest(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
7034
+ const closestTextbox = closest$1(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
7035
7035
  if (!closestTextbox) {
7036
7036
  this.handleBlur();
7037
7037
  }
@@ -8282,6 +8282,7 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
8282
8282
  this.updateValues = new Subject();
8283
8283
  this.notifyNgChanged = () => { };
8284
8284
  this.notifyNgTouched = () => { };
8285
+ validatePackage(packageMetadata);
8285
8286
  this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
8286
8287
  this.direction = rtl ? 'rtl' : 'ltr';
8287
8288
  });
@@ -8919,6 +8920,29 @@ ColorGradientComponent = ColorGradientComponent_1 = __decorate([
8919
8920
  LocalizationService])
8920
8921
  ], ColorGradientComponent);
8921
8922
 
8923
+ /**
8924
+ * @hidden
8925
+ */
8926
+ let ColorPaletteLocalizationService = class ColorPaletteLocalizationService extends LocalizationService {
8927
+ constructor(prefix, messageService, _rtl, flatColorPickerLocalization) {
8928
+ super(prefix, messageService, _rtl);
8929
+ this.flatColorPickerLocalization = flatColorPickerLocalization;
8930
+ }
8931
+ get(shortKey) {
8932
+ if (this.flatColorPickerLocalization) {
8933
+ return this.flatColorPickerLocalization.get(shortKey);
8934
+ }
8935
+ return super.get(shortKey);
8936
+ }
8937
+ };
8938
+ ColorPaletteLocalizationService = __decorate([
8939
+ __param(0, Inject(L10N_PREFIX)),
8940
+ __param(1, Optional()),
8941
+ __param(2, Optional()), __param(2, Inject(RTL)),
8942
+ __param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
8943
+ __metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
8944
+ ], ColorPaletteLocalizationService);
8945
+
8922
8946
  /**
8923
8947
  * @hidden
8924
8948
  */
@@ -8981,29 +9005,6 @@ ColorPaletteService = __decorate([
8981
9005
  Injectable()
8982
9006
  ], ColorPaletteService);
8983
9007
 
8984
- /**
8985
- * @hidden
8986
- */
8987
- let ColorPaletteLocalizationService = class ColorPaletteLocalizationService extends LocalizationService {
8988
- constructor(prefix, messageService, _rtl, flatColorPickerLocalization) {
8989
- super(prefix, messageService, _rtl);
8990
- this.flatColorPickerLocalization = flatColorPickerLocalization;
8991
- }
8992
- get(shortKey) {
8993
- if (this.flatColorPickerLocalization) {
8994
- return this.flatColorPickerLocalization.get(shortKey);
8995
- }
8996
- return super.get(shortKey);
8997
- }
8998
- };
8999
- ColorPaletteLocalizationService = __decorate([
9000
- __param(0, Inject(L10N_PREFIX)),
9001
- __param(1, Optional()),
9002
- __param(2, Optional()), __param(2, Inject(RTL)),
9003
- __param(3, Optional()), __param(3, Inject(FlatColorPickerLocalizationService)),
9004
- __metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
9005
- ], ColorPaletteLocalizationService);
9006
-
9007
9008
  var ColorPaletteComponent_1;
9008
9009
  const DEFAULT_TILE_SIZE = 24;
9009
9010
  const DEFAULT_COLUMNS_COUNT = 10;
@@ -9077,6 +9078,7 @@ let ColorPaletteComponent = ColorPaletteComponent_1 = class ColorPaletteComponen
9077
9078
  this._tabindex = 0;
9078
9079
  this.notifyNgTouched = () => { };
9079
9080
  this.notifyNgChanged = () => { };
9081
+ validatePackage(packageMetadata);
9080
9082
  this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
9081
9083
  this.direction = rtl ? 'rtl' : 'ltr';
9082
9084
  });
@@ -9669,9 +9671,9 @@ var FlatColorPickerComponent_1;
9669
9671
  * through a gradient that renders an hsv canvas. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
9670
9672
  */
9671
9673
  let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPickerComponent {
9672
- constructor(service, host, localizationService, cdr, renderer, ngZone) {
9673
- this.service = service;
9674
+ constructor(host, service, localizationService, cdr, renderer, ngZone) {
9674
9675
  this.host = host;
9676
+ this.service = service;
9675
9677
  this.localizationService = localizationService;
9676
9678
  this.cdr = cdr;
9677
9679
  this.renderer = renderer;
@@ -9754,6 +9756,7 @@ let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPicke
9754
9756
  this.subscriptions = new Subscription();
9755
9757
  this.notifyNgChanged = () => { };
9756
9758
  this.notifyNgTouched = () => { };
9759
+ validatePackage(packageMetadata);
9757
9760
  this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
9758
9761
  this.direction = rtl ? 'rtl' : 'ltr';
9759
9762
  });
@@ -10227,8 +10230,8 @@ FlatColorPickerComponent = FlatColorPickerComponent_1 = __decorate([
10227
10230
  </div>
10228
10231
  `
10229
10232
  }),
10230
- __metadata("design:paramtypes", [FlatColorPickerService,
10231
- ElementRef,
10233
+ __metadata("design:paramtypes", [ElementRef,
10234
+ FlatColorPickerService,
10232
10235
  LocalizationService,
10233
10236
  ChangeDetectorRef,
10234
10237
  Renderer2,
@@ -10236,7 +10239,7 @@ FlatColorPickerComponent = FlatColorPickerComponent_1 = __decorate([
10236
10239
  ], FlatColorPickerComponent);
10237
10240
 
10238
10241
  var ColorPickerComponent_1;
10239
- let serial$2 = 0;
10242
+ const DOM_FOCUS_EVENTS = ['focus', 'blur'];
10240
10243
  /**
10241
10244
  * Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
10242
10245
  *
@@ -10252,10 +10255,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10252
10255
  this.ngZone = ngZone;
10253
10256
  this.renderer = renderer;
10254
10257
  this.hostClasses = true;
10255
- /**
10256
- * @hidden
10257
- */
10258
- this.focusableId = `k-colorpicker-${serial$2++}`;
10258
+ this.role = 'listbox';
10259
10259
  /**
10260
10260
  * Specifies the views that will be rendered in the popup.
10261
10261
  * By default both the gradient and palette views will be rendered.
@@ -10351,6 +10351,10 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10351
10351
  * Used to provide a two-way binding for the `activeView` property.
10352
10352
  */
10353
10353
  this.activeViewChange = new EventEmitter();
10354
+ /**
10355
+ * Indicates whether the ColorPicker wrapper is focused.
10356
+ */
10357
+ this.isFocused = false;
10354
10358
  this._tabindex = 0;
10355
10359
  this._popupSettings = { animate: true };
10356
10360
  this._paletteSettings = {};
@@ -10358,13 +10362,30 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10358
10362
  this._size = 'medium';
10359
10363
  this._rounded = 'medium';
10360
10364
  this._fillMode = 'solid';
10365
+ this.subscriptions = new Subscription();
10361
10366
  this.notifyNgTouched = () => { };
10362
10367
  this.notifyNgChanged = () => { };
10368
+ this.domFocusListener = (event) => event.stopImmediatePropagation();
10363
10369
  validatePackage(packageMetadata);
10364
10370
  this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
10365
10371
  this.direction = rtl ? 'rtl' : 'ltr';
10366
10372
  });
10367
10373
  }
10374
+ get focusedClass() {
10375
+ return this.isFocused;
10376
+ }
10377
+ get disabledClass() {
10378
+ return this.disabled;
10379
+ }
10380
+ get ariaReadonly() {
10381
+ return this.readonly;
10382
+ }
10383
+ get ariaExpanded() {
10384
+ return this.isOpen;
10385
+ }
10386
+ get hostTabindex() {
10387
+ return this.tabindex;
10388
+ }
10368
10389
  /**
10369
10390
  * @hidden
10370
10391
  */
@@ -10509,6 +10530,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10509
10530
  stylingInputs.forEach(input => {
10510
10531
  this.handleClasses(this[input], input);
10511
10532
  });
10533
+ this.setHostElementAriaLabel();
10534
+ this.handleHostId();
10535
+ this.initDomEvents();
10512
10536
  }
10513
10537
  ngOnChanges(changes) {
10514
10538
  if (changes.format && changes.format.currentValue === 'name') {
@@ -10518,18 +10542,17 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10518
10542
  this.format = 'rgba';
10519
10543
  this.value = parseColor$1(this.value, this.format, this.gradientSettings.opacity);
10520
10544
  }
10545
+ if (isChanged('value', changes)) {
10546
+ this.setHostElementAriaLabel();
10547
+ }
10521
10548
  }
10522
10549
  ngOnDestroy() {
10523
10550
  this.closePopup();
10524
10551
  if (this.dynamicRTLSubscription) {
10525
10552
  this.dynamicRTLSubscription.unsubscribe();
10526
10553
  }
10527
- }
10528
- /**
10529
- * @hidden
10530
- */
10531
- get colorPickerAriaLabel() {
10532
- return this.value ? this.value : this.localizationService.get('colorPickerNoColor');
10554
+ this.subscriptions.unsubscribe();
10555
+ this.handleDomEvents('remove', DOM_FOCUS_EVENTS);
10533
10556
  }
10534
10557
  /**
10535
10558
  * @hidden
@@ -10541,28 +10564,33 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10541
10564
  * @hidden
10542
10565
  */
10543
10566
  togglePopup() {
10544
- this.toggleWithEvents(!this.isOpen);
10545
10567
  this.focus();
10568
+ this.toggleWithEvents(!this.isOpen);
10546
10569
  }
10547
10570
  /**
10548
10571
  * @hidden
10549
10572
  */
10550
- handleActiveColorClick() {
10573
+ handleWrapperClick(event) {
10574
+ if (this.disabled) {
10575
+ return;
10576
+ }
10551
10577
  this.focus();
10552
- const event = new ActiveColorClickEvent(this.value);
10553
- this.activeColorClick.emit(event);
10554
- if (!event.isOpenPrevented() || this.isOpen) {
10555
- this.togglePopup();
10578
+ if (closest(event.target, (element) => element === this.activeColor.nativeElement)) {
10579
+ const event = new ActiveColorClickEvent(this.value);
10580
+ this.activeColorClick.emit(event);
10581
+ if (!event.isOpenPrevented() || this.isOpen) {
10582
+ this.toggleWithEvents(!this.isOpen);
10583
+ }
10584
+ return;
10556
10585
  }
10586
+ this.toggleWithEvents(!this.isOpen);
10557
10587
  }
10558
10588
  /**
10559
10589
  * Focuses the wrapper of the ColorPicker.
10560
10590
  */
10561
10591
  focus() {
10562
- if (this.disabled) {
10563
- return;
10564
- }
10565
- this.wrapper.nativeElement.focus();
10592
+ this.isFocused = true;
10593
+ this.host.nativeElement.focus();
10566
10594
  }
10567
10595
  /**
10568
10596
  * @hidden
@@ -10571,14 +10599,18 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10571
10599
  if (this.isFocused) {
10572
10600
  return;
10573
10601
  }
10574
- this.isFocused = true;
10575
- this.onFocus.emit();
10602
+ this.ngZone.run(() => {
10603
+ this.focus();
10604
+ this.onFocus.emit();
10605
+ });
10576
10606
  }
10577
10607
  /**
10578
10608
  * Blurs the ColorPicker.
10579
10609
  */
10580
10610
  blur() {
10581
- this.wrapper.nativeElement.blur();
10611
+ this.isFocused = false;
10612
+ this.host.nativeElement.blur();
10613
+ this.notifyNgTouched();
10582
10614
  }
10583
10615
  /**
10584
10616
  * @hidden
@@ -10587,9 +10619,16 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10587
10619
  if (this.isOpen) {
10588
10620
  return;
10589
10621
  }
10590
- this.isFocused = false;
10591
- this.onBlur.emit();
10592
- this.notifyNgTouched();
10622
+ this.ngZone.run(() => {
10623
+ this.onBlur.emit();
10624
+ this.isFocused = false;
10625
+ });
10626
+ }
10627
+ /**
10628
+ * @hidden
10629
+ */
10630
+ arrowButtonMouseDown(ev) {
10631
+ ev.preventDefault();
10593
10632
  }
10594
10633
  /**
10595
10634
  * Clears the value of the ColorPicker.
@@ -10599,6 +10638,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10599
10638
  return;
10600
10639
  }
10601
10640
  this._value = undefined;
10641
+ this.setHostElementAriaLabel();
10602
10642
  this.notifyNgChanged(undefined);
10603
10643
  }
10604
10644
  /**
@@ -10626,6 +10666,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10626
10666
  if (valueChange) {
10627
10667
  this.value = parsedColor;
10628
10668
  this.valueChange.emit(parsedColor);
10669
+ this.setHostElementAriaLabel();
10629
10670
  this.notifyNgChanged(parsedColor);
10630
10671
  }
10631
10672
  }
@@ -10672,7 +10713,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10672
10713
  handleWrapperKeyDown(event) {
10673
10714
  if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.Enter) {
10674
10715
  event.preventDefault();
10675
- this.toggleWithEvents(true);
10716
+ this.ngZone.run(() => {
10717
+ this.toggleWithEvents(true);
10718
+ });
10676
10719
  }
10677
10720
  }
10678
10721
  /**
@@ -10681,14 +10724,14 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10681
10724
  handlePopupKeyDown(event) {
10682
10725
  if (event.keyCode === Keys.Escape) {
10683
10726
  this.toggleWithEvents(false);
10684
- this.wrapper.nativeElement.focus();
10727
+ this.host.nativeElement.focus();
10685
10728
  }
10686
10729
  if (event.keyCode === Keys.Tab) {
10687
10730
  const currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
10688
10731
  const nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
10689
10732
  if (event.target === currentElement) {
10690
10733
  event.preventDefault();
10691
- nextElement.nativeElement.focus();
10734
+ nextElement.focus();
10692
10735
  }
10693
10736
  }
10694
10737
  }
@@ -10699,6 +10742,10 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10699
10742
  isEmpty() {
10700
10743
  return false;
10701
10744
  }
10745
+ setHostElementAriaLabel() {
10746
+ const ariaLabelValue = `${this.value ? this.value : this.localizationService.get('colorPickerNoColor')}`;
10747
+ this.renderer.setAttribute(this.host.nativeElement, 'aria-label', ariaLabelValue);
10748
+ }
10702
10749
  handleClasses(value, input) {
10703
10750
  const elem = this.host.nativeElement;
10704
10751
  const classes = getStylingClasses('picker', input, this[input], value);
@@ -10710,9 +10757,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10710
10757
  }
10711
10758
  }
10712
10759
  popupBlurInvalid(ev) {
10713
- const focusInPopupElement = this.popupRef.popupElement.contains(ev.relatedTarget);
10714
- const wrapperClicked = ev.relatedTarget === this.wrapper.nativeElement;
10715
- return !this.isFocused || wrapperClicked || focusInPopupElement;
10760
+ const focusInFlatColorPickerElement = this.popupRef.popupElement.contains(ev.relatedTarget);
10761
+ const hostClicked = closest(ev.relatedTarget, (element) => element === this.host.nativeElement);
10762
+ return hostClicked || focusInFlatColorPickerElement;
10716
10763
  }
10717
10764
  toggleWithEvents(open) {
10718
10765
  const sameState = this.isOpen === open;
@@ -10736,12 +10783,12 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10736
10783
  }
10737
10784
  }
10738
10785
  focusFirstElement() {
10739
- this.ngZone.runOutsideAngular(() => {
10740
- setTimeout(() => {
10786
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
10787
+ if (this.flatColorPicker) {
10741
10788
  const elementToFocus = this.flatColorPicker.gradient ? this.flatColorPicker.gradient.gradientDragHandle :
10742
10789
  this.flatColorPicker.palette.host;
10743
10790
  elementToFocus.nativeElement.focus();
10744
- });
10791
+ }
10745
10792
  });
10746
10793
  }
10747
10794
  openPopup() {
@@ -10749,7 +10796,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10749
10796
  const anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
10750
10797
  const popupPosition = { horizontal: horizontalAlign, vertical: "top" };
10751
10798
  this.popupRef = this.popupService.open({
10752
- anchor: this.wrapper,
10799
+ anchor: this.activeColor,
10753
10800
  animate: this.popupSettings.animate,
10754
10801
  appendTo: this.popupSettings.appendTo,
10755
10802
  popupAlign: popupPosition,
@@ -10761,7 +10808,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10761
10808
  this.popupRef.popupAnchorViewportLeave.subscribe(() => {
10762
10809
  this.toggleWithEvents(false);
10763
10810
  if (!this.isOpen) {
10764
- this.wrapper.nativeElement.focus({
10811
+ this.host.nativeElement.focus({
10765
10812
  preventScroll: true
10766
10813
  });
10767
10814
  }
@@ -10789,6 +10836,51 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
10789
10836
  }
10790
10837
  return this.gradientSettings.opacity ? this.flatColorPicker.gradient.inputs.opacityInput.numericInput : this.flatColorPicker.gradient.inputs.blueInput;
10791
10838
  }
10839
+ handleDomEvents(action, events) {
10840
+ const hostElement = this.host.nativeElement;
10841
+ events.forEach(ev => hostElement[`${action}EventListener`](ev, this.domFocusListener, true));
10842
+ }
10843
+ initDomEvents() {
10844
+ if (!this.host) {
10845
+ return;
10846
+ }
10847
+ let hostElement = this.host.nativeElement;
10848
+ this.ngZone.runOutsideAngular(() => {
10849
+ this.subscriptions.add(this.renderer.listen(hostElement, 'focusin', () => {
10850
+ this.handleWrapperFocus();
10851
+ }));
10852
+ this.subscriptions.add(this.renderer.listen(hostElement, 'focusout', (event) => {
10853
+ const closestPopup = this.popupRef ?
10854
+ closest(event.relatedTarget, (element) => element === this.flatColorPicker.host.nativeElement) :
10855
+ false;
10856
+ const closestWrapper = closest(event.relatedTarget, (element) => element === this.host.nativeElement);
10857
+ if (!closestPopup && !closestWrapper) {
10858
+ this.handleWrapperBlur();
10859
+ }
10860
+ }));
10861
+ this.handleDomEvents('add', DOM_FOCUS_EVENTS);
10862
+ this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (event) => {
10863
+ this.handleWrapperKeyDown(event);
10864
+ }));
10865
+ this.subscriptions.add(this.renderer.listen(hostElement, 'click', (event) => {
10866
+ this.ngZone.run(() => {
10867
+ this.handleWrapperClick(event);
10868
+ });
10869
+ }));
10870
+ });
10871
+ }
10872
+ handleHostId() {
10873
+ const hostElement = this.host.nativeElement;
10874
+ const existingId = hostElement.getAttribute('id');
10875
+ if (existingId) {
10876
+ this.focusableId = existingId;
10877
+ }
10878
+ else {
10879
+ const id = `k-${guid()}`;
10880
+ hostElement.setAttribute('id', id);
10881
+ this.focusableId = id;
10882
+ }
10883
+ }
10792
10884
  };
10793
10885
  __decorate([
10794
10886
  HostBinding('class.k-colorpicker'),
@@ -10796,14 +10888,40 @@ __decorate([
10796
10888
  HostBinding('class.k-picker'),
10797
10889
  __metadata("design:type", Boolean)
10798
10890
  ], ColorPickerComponent.prototype, "hostClasses", void 0);
10891
+ __decorate([
10892
+ HostBinding('class.k-focus'),
10893
+ __metadata("design:type", Boolean),
10894
+ __metadata("design:paramtypes", [])
10895
+ ], ColorPickerComponent.prototype, "focusedClass", null);
10896
+ __decorate([
10897
+ HostBinding('attr.aria-disabled'),
10898
+ HostBinding('class.k-disabled'),
10899
+ __metadata("design:type", Boolean),
10900
+ __metadata("design:paramtypes", [])
10901
+ ], ColorPickerComponent.prototype, "disabledClass", null);
10902
+ __decorate([
10903
+ HostBinding('attr.aria-readonly'),
10904
+ __metadata("design:type", Boolean),
10905
+ __metadata("design:paramtypes", [])
10906
+ ], ColorPickerComponent.prototype, "ariaReadonly", null);
10907
+ __decorate([
10908
+ HostBinding('attr.aria-expanded'),
10909
+ __metadata("design:type", Boolean),
10910
+ __metadata("design:paramtypes", [])
10911
+ ], ColorPickerComponent.prototype, "ariaExpanded", null);
10912
+ __decorate([
10913
+ HostBinding('attr.tabindex'),
10914
+ __metadata("design:type", Number),
10915
+ __metadata("design:paramtypes", [])
10916
+ ], ColorPickerComponent.prototype, "hostTabindex", null);
10799
10917
  __decorate([
10800
10918
  HostBinding('attr.dir'),
10801
10919
  __metadata("design:type", String)
10802
10920
  ], ColorPickerComponent.prototype, "direction", void 0);
10803
10921
  __decorate([
10804
- Input(),
10922
+ HostBinding('attr.role'),
10805
10923
  __metadata("design:type", String)
10806
- ], ColorPickerComponent.prototype, "focusableId", void 0);
10924
+ ], ColorPickerComponent.prototype, "role", void 0);
10807
10925
  __decorate([
10808
10926
  Input(),
10809
10927
  __metadata("design:type", Array)
@@ -10926,9 +11044,9 @@ __decorate([
10926
11044
  __metadata("design:type", ViewContainerRef)
10927
11045
  ], ColorPickerComponent.prototype, "container", void 0);
10928
11046
  __decorate([
10929
- ViewChild('wrapper', { static: true }),
11047
+ ViewChild('activeColor', { static: true }),
10930
11048
  __metadata("design:type", ElementRef)
10931
- ], ColorPickerComponent.prototype, "wrapper", void 0);
11049
+ ], ColorPickerComponent.prototype, "activeColor", void 0);
10932
11050
  __decorate([
10933
11051
  ViewChild('popupTemplate', { static: true }),
10934
11052
  __metadata("design:type", TemplateRef)
@@ -10994,38 +11112,19 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
10994
11112
  i18n-cancelButton="kendo.colorpicker.cancelButton|The message for the Cancel action button."
10995
11113
  cancelButton="Cancel">
10996
11114
  </ng-container>
10997
- <span
10998
- #wrapper
10999
- [ngClass]="{
11000
- 'k-input-inner': true,
11001
- 'k-disabled': this.disabled,
11002
- 'k-focus': this.isFocused
11003
- }"
11004
- role="listbox"
11005
- [attr.aria-expanded]="isOpen"
11006
- [attr.aria-readonly]="readonly"
11007
- [attr.aria-disabled]="disabled"
11008
- [attr.aria-label]="colorPickerAriaLabel"
11009
- [id]="focusableId"
11010
- [attr.tabindex]="tabindex"
11011
- (focus)="handleWrapperFocus()"
11012
- (blur)="handleWrapperBlur()"
11013
- (mousedown)="$event.preventDefault()"
11014
- (keydown)="handleWrapperKeyDown($event)"
11015
- >
11115
+ <span #activeColor class="k-input-inner">
11016
11116
  <span
11017
11117
  class="k-value-icon k-color-preview"
11018
- [ngClass]="{'k-icon-color-preview': iconStyles, 'k-no-color': !value}"
11019
- (click)="handleActiveColorClick()">
11118
+ [ngClass]="{'k-icon-color-preview': iconStyles, 'k-no-color': !value}">
11020
11119
  <span *ngIf="iconClass || icon" class="k-color-preview-icon k-icon" [ngClass]="iconStyles"></span>
11021
11120
  <span class="k-color-preview-mask" [style.background-color]="value"></span>
11022
11121
  </span>
11023
11122
  </span>
11024
11123
  <button
11025
- type="button"
11026
- class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button"
11027
- [attr.aria-label]="colorPickerAriaLabel"
11028
- (click)="togglePopup()">
11124
+ #arrowButton
11125
+ tabindex="-1"
11126
+ role="button"
11127
+ class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button">
11029
11128
  <span class="k-button-icon k-icon k-i-arrow-s"></span>
11030
11129
  </button>
11031
11130
  <ng-template #popupTemplate>
@@ -11040,8 +11139,8 @@ ColorPickerComponent = ColorPickerComponent_1 = __decorate([
11040
11139
  [gradientSettings]="gradientSettings"
11041
11140
  [paletteSettings]="paletteSettings"
11042
11141
  [clearButton]="clearButton"
11043
- (focusout)="handlePopupBlur($event)"
11044
11142
  (cancel)="handleCancelEvent($event)"
11143
+ (focusout)="handlePopupBlur($event)"
11045
11144
  (valueChange)="handleValueChange($event)"
11046
11145
  (keydown)="handlePopupKeyDown($event)"
11047
11146
  (activeViewChange)="activeViewChange.emit($event)"
@@ -11616,6 +11715,7 @@ let RadioButtonDirective = class RadioButtonDirective {
11616
11715
  this.hostElement = hostElement;
11617
11716
  this.kendoClass = true;
11618
11717
  this._size = 'medium';
11718
+ validatePackage(packageMetadata);
11619
11719
  }
11620
11720
  /**
11621
11721
  * The size property specifies the width and height of the RadioButton
@@ -11709,7 +11809,7 @@ RadioButtonModule = __decorate([
11709
11809
  })
11710
11810
  ], RadioButtonModule);
11711
11811
 
11712
- let serial$3 = 0;
11812
+ let serial$2 = 0;
11713
11813
  /**
11714
11814
  * Represents an error message that will be shown underneath
11715
11815
  * a Kendo control or native HTML form-bound component after a validation.
@@ -11732,7 +11832,7 @@ let ErrorComponent = class ErrorComponent {
11732
11832
  /**
11733
11833
  * @hidden
11734
11834
  */
11735
- this.id = `kendo-error-${serial$3++}`;
11835
+ this.id = `kendo-error-${serial$2++}`;
11736
11836
  this.roleAttribute = 'alert';
11737
11837
  }
11738
11838
  get startClass() {
@@ -11781,7 +11881,7 @@ ErrorComponent = __decorate([
11781
11881
  })
11782
11882
  ], ErrorComponent);
11783
11883
 
11784
- let serial$4 = 0;
11884
+ let serial$3 = 0;
11785
11885
  /**
11786
11886
  * Represents a hint message that will be shown underneath a form-bound component.
11787
11887
  */
@@ -11801,7 +11901,7 @@ let HintComponent = class HintComponent {
11801
11901
  /**
11802
11902
  * @hidden
11803
11903
  */
11804
- this.id = `kendo-hint-${serial$4++}`;
11904
+ this.id = `kendo-hint-${serial$3++}`;
11805
11905
  this.hostClass = true;
11806
11906
  }
11807
11907
  get startClass() {