@clr/angular 15.0.0-beta.3 → 15.0.0-beta.4

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 (41) hide show
  1. package/clarity.api.md +8 -7
  2. package/data/datagrid/datagrid-detail.d.ts +1 -1
  3. package/data/tree-view/tree-node.d.ts +3 -2
  4. package/esm2020/data/datagrid/datagrid-column-separator.mjs +5 -4
  5. package/esm2020/data/datagrid/datagrid-detail.mjs +5 -5
  6. package/esm2020/data/datagrid/datagrid-page-size.mjs +6 -5
  7. package/esm2020/data/tree-view/tree-node.mjs +20 -18
  8. package/esm2020/forms/combobox/combobox.mjs +3 -3
  9. package/esm2020/forms/combobox/providers/combobox-focus-handler.service.mjs +11 -11
  10. package/esm2020/forms/datepicker/calendar.mjs +8 -7
  11. package/esm2020/forms/datepicker/date-container.mjs +4 -4
  12. package/esm2020/forms/datepicker/monthpicker.mjs +8 -7
  13. package/esm2020/forms/datepicker/yearpicker.mjs +8 -7
  14. package/esm2020/layout/tabs/tabs.mjs +3 -3
  15. package/esm2020/modal/modal.mjs +3 -3
  16. package/esm2020/popover/common/abstract-popover.mjs +4 -3
  17. package/esm2020/popover/dropdown/providers/dropdown-focus-handler.service.mjs +6 -6
  18. package/esm2020/popover/tooltip/providers/tooltip-mouse.service.mjs +43 -0
  19. package/esm2020/popover/tooltip/tooltip-content.mjs +20 -6
  20. package/esm2020/popover/tooltip/tooltip-trigger.mjs +21 -13
  21. package/esm2020/popover/tooltip/tooltip.mjs +14 -3
  22. package/esm2020/utils/enums/keys.enum.mjs +30 -0
  23. package/esm2020/utils/focus/key-focus/key-focus.mjs +13 -13
  24. package/esm2020/utils/focus/key-focus/roving-tabindex.mjs +4 -4
  25. package/esm2020/utils/focus/key-focus/util.mjs +17 -20
  26. package/esm2020/utils/i18n/common-strings.default.mjs +1 -2
  27. package/esm2020/utils/i18n/common-strings.interface.mjs +1 -1
  28. package/fesm2015/clr-angular.mjs +202 -155
  29. package/fesm2015/clr-angular.mjs.map +1 -1
  30. package/fesm2020/clr-angular.mjs +202 -155
  31. package/fesm2020/clr-angular.mjs.map +1 -1
  32. package/package.json +1 -1
  33. package/popover/tooltip/providers/tooltip-mouse.service.d.ts +15 -0
  34. package/popover/tooltip/tooltip-content.d.ts +6 -2
  35. package/popover/tooltip/tooltip-trigger.d.ts +6 -2
  36. package/utils/enums/{key-codes.enum.d.ts → keys.enum.d.ts} +3 -7
  37. package/utils/focus/key-focus/util.d.ts +1 -1
  38. package/utils/i18n/common-strings.interface.d.ts +0 -1
  39. package/esm2020/utils/enums/key-codes.enum.mjs +0 -34
  40. package/esm2020/utils/key-codes/key-codes.mjs +0 -16
  41. package/utils/key-codes/key-codes.d.ts +0 -10
@@ -313,7 +313,6 @@ const commonStringsDefault = {
313
313
  alertCloseButtonAriaLabel: 'Close alert',
314
314
  // Date Picker
315
315
  datepickerDialogLabel: 'Choose date',
316
- datepickerToggle: 'Toggle datepicker',
317
316
  datepickerToggleChooseDateLabel: 'Choose date',
318
317
  datepickerToggleChangeDateLabel: 'Change date, {SELECTED_DATE}',
319
318
  datepickerPreviousMonth: 'Previous month',
@@ -1318,69 +1317,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
1318
1317
  * This software is released under MIT license.
1319
1318
  * The full license information can be found in LICENSE in the root directory of this project.
1320
1319
  */
1321
- var KeyCodes;
1322
- (function (KeyCodes) {
1323
- KeyCodes["ArrowLeft"] = "ArrowLeft";
1324
- KeyCodes["ArrowUp"] = "ArrowUp";
1325
- KeyCodes["ArrowRight"] = "ArrowRight";
1326
- KeyCodes["ArrowDown"] = "ArrowDown";
1327
- KeyCodes["Backspace"] = "Backspace";
1328
- KeyCodes["Tab"] = "Tab";
1329
- KeyCodes["Enter"] = "Enter";
1330
- KeyCodes["Escape"] = "Escape";
1331
- KeyCodes["Space"] = "Space";
1332
- KeyCodes["Spacebar"] = " ";
1333
- KeyCodes["Home"] = "Home";
1334
- KeyCodes["End"] = "End";
1335
- })(KeyCodes || (KeyCodes = {}));
1336
- var IEKeyCodes;
1337
- (function (IEKeyCodes) {
1338
- IEKeyCodes["ArrowUp"] = "Up";
1339
- IEKeyCodes["ArrowDown"] = "Down";
1340
- IEKeyCodes["ArrowRight"] = "Right";
1341
- IEKeyCodes["ArrowLeft"] = "Left";
1342
- IEKeyCodes["Space"] = "Spacebar";
1343
- IEKeyCodes["Escape"] = "Esc";
1344
- IEKeyCodes["Home"] = "Home";
1345
- IEKeyCodes["End"] = "End";
1346
- IEKeyCodes["Enter"] = "Enter";
1347
- IEKeyCodes["Tab"] = "Tab";
1348
- })(IEKeyCodes || (IEKeyCodes = {}));
1320
+ var Keys;
1321
+ (function (Keys) {
1322
+ Keys["ArrowLeft"] = "ArrowLeft";
1323
+ Keys["ArrowUp"] = "ArrowUp";
1324
+ Keys["ArrowRight"] = "ArrowRight";
1325
+ Keys["ArrowDown"] = "ArrowDown";
1326
+ Keys["Backspace"] = "Backspace";
1327
+ Keys["Tab"] = "Tab";
1328
+ Keys["Enter"] = "Enter";
1329
+ Keys["Escape"] = "Escape";
1330
+ Keys["Space"] = "Space";
1331
+ Keys["Spacebar"] = " ";
1332
+ Keys["Home"] = "Home";
1333
+ Keys["End"] = "End";
1334
+ })(Keys || (Keys = {}));
1335
+ var IEKeys;
1336
+ (function (IEKeys) {
1337
+ IEKeys["ArrowUp"] = "Up";
1338
+ IEKeys["ArrowDown"] = "Down";
1339
+ IEKeys["ArrowRight"] = "Right";
1340
+ IEKeys["ArrowLeft"] = "Left";
1341
+ IEKeys["Space"] = "Spacebar";
1342
+ IEKeys["Escape"] = "Esc";
1343
+ })(IEKeys || (IEKeys = {}));
1349
1344
 
1350
1345
  /*
1351
1346
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
1352
1347
  * This software is released under MIT license.
1353
1348
  * The full license information can be found in LICENSE in the root directory of this project.
1354
1349
  */
1355
- function keyValidator(key) {
1356
- if (key === KeyCodes.ArrowUp || key === IEKeyCodes.ArrowUp) {
1357
- return KeyCodes.ArrowUp;
1350
+ function normalizeKey(key) {
1351
+ if (key === Keys.ArrowUp || key === IEKeys.ArrowUp) {
1352
+ return Keys.ArrowUp;
1358
1353
  }
1359
- else if (key === KeyCodes.ArrowDown || key === IEKeyCodes.ArrowDown) {
1360
- return KeyCodes.ArrowDown;
1354
+ else if (key === Keys.ArrowDown || key === IEKeys.ArrowDown) {
1355
+ return Keys.ArrowDown;
1361
1356
  }
1362
- else if (key === KeyCodes.ArrowRight || key === IEKeyCodes.ArrowRight) {
1363
- return KeyCodes.ArrowRight;
1357
+ else if (key === Keys.ArrowRight || key === IEKeys.ArrowRight) {
1358
+ return Keys.ArrowRight;
1364
1359
  }
1365
- else if (key === KeyCodes.ArrowLeft || key === IEKeyCodes.ArrowLeft) {
1366
- return KeyCodes.ArrowLeft;
1360
+ else if (key === Keys.ArrowLeft || key === IEKeys.ArrowLeft) {
1361
+ return Keys.ArrowLeft;
1367
1362
  }
1368
- else if (key === KeyCodes.Space || key === IEKeyCodes.Space) {
1369
- return KeyCodes.Space;
1363
+ else if (key === Keys.Space || key === IEKeys.Space) {
1364
+ return Keys.Space;
1370
1365
  }
1371
- else if (key === KeyCodes.Escape || key === IEKeyCodes.Escape) {
1372
- return KeyCodes.Escape;
1366
+ else if (key === Keys.Escape || key === IEKeys.Escape) {
1367
+ return Keys.Escape;
1373
1368
  }
1374
1369
  else {
1375
1370
  return key;
1376
1371
  }
1377
1372
  }
1378
1373
  function preventArrowKeyScroll(event) {
1379
- const validKey = keyValidator(event.key);
1380
- if (validKey === KeyCodes.ArrowUp ||
1381
- validKey === KeyCodes.ArrowDown ||
1382
- validKey === KeyCodes.ArrowLeft ||
1383
- validKey === KeyCodes.ArrowRight) {
1374
+ const key = normalizeKey(event.key);
1375
+ if (key === Keys.ArrowUp || key === Keys.ArrowDown || key === Keys.ArrowLeft || key === Keys.ArrowRight) {
1384
1376
  // prevent element container scroll
1385
1377
  // MDN references this is really the only way to prevent native browser interactions
1386
1378
  // https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets
@@ -4959,10 +4951,10 @@ class ClrKeyFocus {
4959
4951
  else if (this.nextKeyPressed(event) && this.currentFocusIsNotLastItem()) {
4960
4952
  this.moveTo(this.current + 1);
4961
4953
  }
4962
- else if (event.code === KeyCodes.Home) {
4954
+ else if (event.code === Keys.Home) {
4963
4955
  this.moveTo(0);
4964
4956
  }
4965
- else if (event.code === KeyCodes.End) {
4957
+ else if (event.code === Keys.End) {
4966
4958
  this.moveTo(this.focusableItems.length - 1);
4967
4959
  }
4968
4960
  preventArrowKeyScroll(event);
@@ -5010,27 +5002,27 @@ class ClrKeyFocus {
5010
5002
  });
5011
5003
  }
5012
5004
  nextKeyPressed(event) {
5013
- const key = keyValidator(event.key);
5005
+ const key = normalizeKey(event.key);
5014
5006
  switch (this.direction) {
5015
5007
  case ClrFocusDirection.VERTICAL:
5016
- return key === KeyCodes.ArrowDown;
5008
+ return key === Keys.ArrowDown;
5017
5009
  case ClrFocusDirection.HORIZONTAL:
5018
- return key === KeyCodes.ArrowRight;
5010
+ return key === Keys.ArrowRight;
5019
5011
  case ClrFocusDirection.BOTH:
5020
- return key === KeyCodes.ArrowDown || key === KeyCodes.ArrowRight;
5012
+ return key === Keys.ArrowDown || key === Keys.ArrowRight;
5021
5013
  default:
5022
5014
  return false;
5023
5015
  }
5024
5016
  }
5025
5017
  prevKeyPressed(event) {
5026
- const key = keyValidator(event.key);
5018
+ const key = normalizeKey(event.key);
5027
5019
  switch (this.direction) {
5028
5020
  case ClrFocusDirection.VERTICAL:
5029
- return key === KeyCodes.ArrowUp;
5021
+ return key === Keys.ArrowUp;
5030
5022
  case ClrFocusDirection.HORIZONTAL:
5031
- return key === KeyCodes.ArrowLeft;
5023
+ return key === Keys.ArrowLeft;
5032
5024
  case ClrFocusDirection.BOTH:
5033
- return key === KeyCodes.ArrowUp || key === KeyCodes.ArrowLeft;
5025
+ return key === Keys.ArrowUp || key === Keys.ArrowLeft;
5034
5026
  default:
5035
5027
  return false;
5036
5028
  }
@@ -5098,10 +5090,10 @@ class ClrRovingTabindex extends ClrKeyFocus {
5098
5090
  else if (this.nextKeyPressed(event) && this.currentFocusIsNotLastItem()) {
5099
5091
  this.updateTabindex(this.current + 1);
5100
5092
  }
5101
- else if (event.code === KeyCodes.Home) {
5093
+ else if (event.code === Keys.Home) {
5102
5094
  this.updateTabindex(0);
5103
5095
  }
5104
- else if (event.code === KeyCodes.End) {
5096
+ else if (event.code === Keys.End) {
5105
5097
  this.updateTabindex(this.focusableItems.length - 1);
5106
5098
  }
5107
5099
  super.handleKeyboardEvent(event);
@@ -5295,22 +5287,6 @@ const FOCUS_SERVICE_PROVIDER = {
5295
5287
  deps: [[new Optional(), new SkipSelf(), FocusService$1], Renderer2],
5296
5288
  };
5297
5289
 
5298
- /*
5299
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
5300
- * This software is released under MIT license.
5301
- * The full license information can be found in LICENSE in the root directory of this project.
5302
- */
5303
- const UP_ARROW = 38;
5304
- const DOWN_ARROW = 40;
5305
- const RIGHT_ARROW = 39;
5306
- const LEFT_ARROW = 37;
5307
- const ENTER = 13;
5308
- const SPACE = 32;
5309
- const SHIFT = 16;
5310
- const TAB = 9;
5311
- const ESC = 27;
5312
- const BACKSPACE = 8;
5313
-
5314
5290
  /*
5315
5291
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
5316
5292
  * This software is released under MIT license.
@@ -5762,10 +5738,10 @@ class ComboboxFocusHandler {
5762
5738
  // this service is only interested in keys that may move the focus
5763
5739
  handleTextInput(event) {
5764
5740
  let preventDefault = false;
5765
- const key = keyValidator(event.key);
5741
+ const key = normalizeKey(event.key);
5766
5742
  if (event) {
5767
5743
  switch (key) {
5768
- case KeyCodes.Enter:
5744
+ case Keys.Enter:
5769
5745
  if (this.toggleService.open && this.pseudoFocus.model) {
5770
5746
  if (this.selectionService.multiselectable) {
5771
5747
  this.selectionService.toggle(this.pseudoFocus.model.value);
@@ -5776,27 +5752,27 @@ class ComboboxFocusHandler {
5776
5752
  preventDefault = true;
5777
5753
  }
5778
5754
  break;
5779
- case KeyCodes.Space:
5755
+ case Keys.Space:
5780
5756
  if (!this.toggleService.open) {
5781
5757
  this.toggleService.open = true;
5782
5758
  preventDefault = true;
5783
5759
  }
5784
5760
  break;
5785
- case KeyCodes.ArrowUp:
5761
+ case Keys.ArrowUp:
5786
5762
  this.preventViewportScrolling(event);
5787
5763
  this.openAndMoveTo(ArrowKeyDirection.UP);
5788
5764
  preventDefault = true;
5789
5765
  break;
5790
- case KeyCodes.ArrowDown:
5766
+ case Keys.ArrowDown:
5791
5767
  this.preventViewportScrolling(event);
5792
5768
  this.openAndMoveTo(ArrowKeyDirection.DOWN);
5793
5769
  preventDefault = true;
5794
5770
  break;
5795
5771
  default:
5796
5772
  // Any other keypress
5797
- if (event.key !== KeyCodes.Tab &&
5798
- !(this.selectionService.multiselectable && event.key === KeyCodes.Backspace) &&
5799
- !(event.key === KeyCodes.Escape) &&
5773
+ if (event.key !== Keys.Tab &&
5774
+ !(this.selectionService.multiselectable && event.key === Keys.Backspace) &&
5775
+ !(event.key === Keys.Escape) &&
5800
5776
  !this.toggleService.open) {
5801
5777
  this.toggleService.open = true;
5802
5778
  }
@@ -6243,7 +6219,7 @@ class ClrCombobox extends WrappedFormControl {
6243
6219
  }
6244
6220
  onKeyUp(event) {
6245
6221
  // if BACKSPACE in multiselect mode, delete the last pill if text is empty
6246
- if (event.keyCode === BACKSPACE && this.multiSelect && this._searchText.length === 0) {
6222
+ if (event.key === Keys.Backspace && this.multiSelect && this._searchText.length === 0) {
6247
6223
  const multiModel = this.optionSelectionService.selectionModel.model;
6248
6224
  if (multiModel && multiModel.length > 0) {
6249
6225
  const lastItem = multiModel[multiModel.length - 1];
@@ -8011,20 +7987,20 @@ class ClrCalendar {
8011
7987
  */
8012
7988
  onKeyDown(event) {
8013
7989
  if (event && this.focusedDay) {
8014
- switch (event.keyCode) {
8015
- case UP_ARROW:
7990
+ switch (normalizeKey(event.key)) {
7991
+ case Keys.ArrowUp:
8016
7992
  event.preventDefault();
8017
7993
  this._dateNavigationService.incrementFocusDay(-1 * NO_OF_DAYS_IN_A_WEEK);
8018
7994
  break;
8019
- case DOWN_ARROW:
7995
+ case Keys.ArrowDown:
8020
7996
  event.preventDefault();
8021
7997
  this._dateNavigationService.incrementFocusDay(NO_OF_DAYS_IN_A_WEEK);
8022
7998
  break;
8023
- case LEFT_ARROW:
7999
+ case Keys.ArrowLeft:
8024
8000
  event.preventDefault();
8025
8001
  this._dateNavigationService.incrementFocusDay(-1);
8026
8002
  break;
8027
- case RIGHT_ARROW:
8003
+ case Keys.ArrowRight:
8028
8004
  event.preventDefault();
8029
8005
  this._dateNavigationService.incrementFocusDay(1);
8030
8006
  break;
@@ -8207,23 +8183,23 @@ class ClrMonthpicker {
8207
8183
  // the logic is fairly simple and it didn't make sense for me
8208
8184
  // to create extra observables just to move this logic to the service.
8209
8185
  if (event) {
8210
- const keyCode = event.keyCode;
8211
- if (keyCode === UP_ARROW && this._focusedMonthIndex > 0) {
8186
+ const key = normalizeKey(event.key);
8187
+ if (key === Keys.ArrowUp && this._focusedMonthIndex > 0) {
8212
8188
  event.preventDefault();
8213
8189
  this._focusedMonthIndex--;
8214
8190
  this._datepickerFocusService.focusCell(this._elRef);
8215
8191
  }
8216
- else if (keyCode === DOWN_ARROW && this._focusedMonthIndex < 11) {
8192
+ else if (key === Keys.ArrowDown && this._focusedMonthIndex < 11) {
8217
8193
  event.preventDefault();
8218
8194
  this._focusedMonthIndex++;
8219
8195
  this._datepickerFocusService.focusCell(this._elRef);
8220
8196
  }
8221
- else if (keyCode === RIGHT_ARROW && this._focusedMonthIndex < 6) {
8197
+ else if (key === Keys.ArrowRight && this._focusedMonthIndex < 6) {
8222
8198
  event.preventDefault();
8223
8199
  this._focusedMonthIndex = this._focusedMonthIndex + 6;
8224
8200
  this._datepickerFocusService.focusCell(this._elRef);
8225
8201
  }
8226
- else if (keyCode === LEFT_ARROW && this._focusedMonthIndex > 5) {
8202
+ else if (key === Keys.ArrowLeft && this._focusedMonthIndex > 5) {
8227
8203
  event.preventDefault();
8228
8204
  this._focusedMonthIndex = this._focusedMonthIndex - 6;
8229
8205
  this._datepickerFocusService.focusCell(this._elRef);
@@ -8427,20 +8403,20 @@ class ClrYearpicker {
8427
8403
  // the logic is fairly simple and it didn't make sense for me
8428
8404
  // to create extra observables just to move this logic to the service.
8429
8405
  if (event) {
8430
- const keyCode = event.keyCode;
8431
- if (keyCode === UP_ARROW) {
8406
+ const key = normalizeKey(event.key);
8407
+ if (key === Keys.ArrowUp) {
8432
8408
  event.preventDefault();
8433
8409
  this.incrementFocusYearBy(-1);
8434
8410
  }
8435
- else if (keyCode === DOWN_ARROW) {
8411
+ else if (key === Keys.ArrowDown) {
8436
8412
  event.preventDefault();
8437
8413
  this.incrementFocusYearBy(1);
8438
8414
  }
8439
- else if (keyCode === RIGHT_ARROW) {
8415
+ else if (key === Keys.ArrowRight) {
8440
8416
  event.preventDefault();
8441
8417
  this.incrementFocusYearBy(5);
8442
8418
  }
8443
- else if (keyCode === LEFT_ARROW) {
8419
+ else if (key === Keys.ArrowLeft) {
8444
8420
  event.preventDefault();
8445
8421
  this.incrementFocusYearBy(-5);
8446
8422
  }
@@ -8734,11 +8710,11 @@ class ClrDateContainer extends ClrAbstractContainer {
8734
8710
  getToggleButtonLabel(day) {
8735
8711
  if (day) {
8736
8712
  const formattedDate = this.dateIOService.toLocaleDisplayFormatString(day.toDate());
8737
- return (this.commonStrings.parse(this.commonStrings.keys.datepickerToggleChangeDateLabel, {
8713
+ return this.commonStrings.parse(this.commonStrings.keys.datepickerToggleChangeDateLabel, {
8738
8714
  SELECTED_DATE: formattedDate,
8739
- }) || this.commonStrings.keys.datepickerToggle);
8715
+ });
8740
8716
  }
8741
- return this.commonStrings.keys.datepickerToggleChooseDateLabel || this.commonStrings.keys.datepickerToggle;
8717
+ return this.commonStrings.keys.datepickerToggleChooseDateLabel;
8742
8718
  }
8743
8719
  listenForDateChanges() {
8744
8720
  // because date-input.ts initializes the input in ngAfterViewInit,
@@ -12268,10 +12244,10 @@ class ClrDatagridColumnSeparator {
12268
12244
  }
12269
12245
  }
12270
12246
  isArrowLeftKeyEvent(event) {
12271
- return event.key === KeyCodes.ArrowLeft || event.key === IEKeyCodes.ArrowLeft;
12247
+ return normalizeKey(event.key) === Keys.ArrowLeft;
12272
12248
  }
12273
12249
  isArrowRightKeyEvent(event) {
12274
- return event.key === KeyCodes.ArrowRight || event.key === IEKeyCodes.ArrowRight;
12250
+ return normalizeKey(event.key) === Keys.ArrowRight;
12275
12251
  }
12276
12252
  ngOnDestroy() {
12277
12253
  this.unlisteners.forEach(unlistener => unlistener());
@@ -15218,12 +15194,12 @@ class ClrDatagridDetail {
15218
15194
  this.detailService = detailService;
15219
15195
  this.commonStrings = commonStrings;
15220
15196
  }
15221
- closeCheck() {
15197
+ close() {
15222
15198
  this.detailService.close();
15223
15199
  }
15224
15200
  }
15225
15201
  ClrDatagridDetail.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridDetail, deps: [{ token: DetailService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
15226
- ClrDatagridDetail.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrDatagridDetail, selector: "clr-dg-detail", host: { listeners: { "document:keyup.esc": "closeCheck()" }, properties: { "class.datagrid-detail-pane": "true" } }, queries: [{ propertyName: "header", first: true, predicate: ClrDatagridDetailHeader, descendants: true }], ngImport: i0, template: `
15202
+ ClrDatagridDetail.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrDatagridDetail, selector: "clr-dg-detail", host: { listeners: { "document:keyup.escape": "close()" }, properties: { "class.datagrid-detail-pane": "true" } }, queries: [{ propertyName: "header", first: true, predicate: ClrDatagridDetailHeader, descendants: true }], ngImport: i0, template: `
15227
15203
  <div
15228
15204
  cdkTrapFocus
15229
15205
  [cdkTrapFocusAutoCapture]="true"
@@ -15268,9 +15244,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
15268
15244
  }], ctorParameters: function () { return [{ type: DetailService }, { type: ClrCommonStringsService }]; }, propDecorators: { header: [{
15269
15245
  type: ContentChild,
15270
15246
  args: [ClrDatagridDetailHeader]
15271
- }], closeCheck: [{
15247
+ }], close: [{
15272
15248
  type: HostListener,
15273
- args: ['document:keyup.esc']
15249
+ args: ['document:keyup.escape']
15274
15250
  }] } });
15275
15251
 
15276
15252
  /*
@@ -15773,19 +15749,19 @@ class ClrDatagridPageSize {
15773
15749
  }
15774
15750
  ClrDatagridPageSize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridPageSize, deps: [{ token: Page }], target: i0.ɵɵFactoryTarget.Component });
15775
15751
  ClrDatagridPageSize.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrDatagridPageSize, selector: "clr-dg-page-size", inputs: { pageSizeOptions: ["clrPageSizeOptions", "pageSizeOptions"], pageSizeOptionsId: ["clrPageSizeOptionsId", "pageSizeOptionsId"] }, ngImport: i0, template: `
15776
- <ng-content></ng-content>
15752
+ <label [for]="pageSizeOptionsId"><ng-content></ng-content></label>
15777
15753
  <div class="clr-select-wrapper">
15778
15754
  <select [id]="pageSizeOptionsId" [class.clr-page-size-select]="true" [(ngModel)]="page.size">
15779
15755
  <option *ngFor="let option of pageSizeOptions" [ngValue]="option">{{ option }}</option>
15780
15756
  </select>
15781
15757
  </div>
15782
- `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
15758
+ `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
15783
15759
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridPageSize, decorators: [{
15784
15760
  type: Component,
15785
15761
  args: [{
15786
15762
  selector: 'clr-dg-page-size',
15787
15763
  template: `
15788
- <ng-content></ng-content>
15764
+ <label [for]="pageSizeOptionsId"><ng-content></ng-content></label>
15789
15765
  <div class="clr-select-wrapper">
15790
15766
  <select [id]="pageSizeOptionsId" [class.clr-page-size-select]="true" [(ngModel)]="page.size">
15791
15767
  <option *ngFor="let option of pageSizeOptions" [ngValue]="option">{{ option }}</option>
@@ -18046,15 +18022,17 @@ class ClrTreeNode {
18046
18022
  this.subscriptions.push(this._model.loading$.pipe(debounceTime(0)).subscribe(isLoading => (this.isModelLoading = isLoading)));
18047
18023
  }
18048
18024
  ngAfterContentInit() {
18049
- if (!this._model.textContent) {
18050
- this._model.textContent = trimAndLowerCase(this.elementRef.nativeElement.textContent);
18051
- }
18052
18025
  this.subscriptions.push(this.typeAheadKeyEvent.pipe(debounceTime(TREE_TYPE_AHEAD_TIMEOUT)).subscribe((bufferedKeys) => {
18053
18026
  this.focusManager.focusNodeStartsWith(bufferedKeys, this._model);
18054
18027
  // reset once bufferedKeys are used
18055
18028
  this.typeAheadKeyBuffer = '';
18056
18029
  }));
18057
18030
  }
18031
+ ngAfterViewInit() {
18032
+ if (!this._model.textContent) {
18033
+ this._model.textContent = trimAndLowerCase(this.elementRef.nativeElement.textContent);
18034
+ }
18035
+ }
18058
18036
  ngOnDestroy() {
18059
18037
  this._model.destroy();
18060
18038
  this.subscriptions.forEach(sub => sub.unsubscribe());
@@ -18089,32 +18067,32 @@ class ClrTreeNode {
18089
18067
  // By default, pressing arrow key makes AT focus go into the nested content of the item.
18090
18068
  preventArrowKeyScroll(event);
18091
18069
  // https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-22
18092
- switch (keyValidator(event.key)) {
18093
- case KeyCodes.ArrowUp:
18070
+ switch (normalizeKey(event.key)) {
18071
+ case Keys.ArrowUp:
18094
18072
  this.focusManager.focusNodeAbove(this._model);
18095
18073
  break;
18096
- case KeyCodes.ArrowDown:
18074
+ case Keys.ArrowDown:
18097
18075
  this.focusManager.focusNodeBelow(this._model);
18098
18076
  break;
18099
- case KeyCodes.ArrowRight:
18077
+ case Keys.ArrowRight:
18100
18078
  this.expandOrFocusFirstChild();
18101
18079
  break;
18102
- case KeyCodes.ArrowLeft:
18080
+ case Keys.ArrowLeft:
18103
18081
  this.collapseOrFocusParent();
18104
18082
  break;
18105
- case KeyCodes.Home:
18083
+ case Keys.Home:
18106
18084
  event.preventDefault();
18107
18085
  this.focusManager.focusFirstVisibleNode();
18108
18086
  break;
18109
- case KeyCodes.End:
18087
+ case Keys.End:
18110
18088
  event.preventDefault();
18111
18089
  this.focusManager.focusLastVisibleNode();
18112
18090
  break;
18113
- case KeyCodes.Enter:
18091
+ case Keys.Enter:
18114
18092
  this.toggleExpandOrTriggerDefault();
18115
18093
  break;
18116
- case KeyCodes.Space:
18117
- case KeyCodes.Spacebar:
18094
+ case Keys.Space:
18095
+ case Keys.Spacebar:
18118
18096
  // to prevent scrolling on space key in this specific case
18119
18097
  event.preventDefault();
18120
18098
  this.toggleExpandOrTriggerDefault();
@@ -18176,7 +18154,7 @@ class ClrTreeNode {
18176
18154
  }
18177
18155
  }
18178
18156
  ClrTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTreeNode, deps: [{ token: PLATFORM_ID }, { token: ClrTreeNode, optional: true, skipSelf: true }, { token: TreeFeaturesService }, { token: IfExpandService }, { token: ClrCommonStringsService }, { token: TreeFocusManagerService }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
18179
- ClrTreeNode.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrTreeNode, selector: "clr-tree-node", inputs: { selected: ["clrSelected", "selected"], expandable: ["clrExpandable", "expandable"], expanded: ["clrExpanded", "expanded"], clrForTypeAhead: "clrForTypeAhead" }, outputs: { selectedChange: "clrSelectedChange", expandedChange: "clrExpandedChange" }, host: { properties: { "class.clr-tree-node": "true" } }, providers: [TREE_FEATURES_PROVIDER, IfExpandService, { provide: LoadingListener, useExisting: IfExpandService }], queries: [{ propertyName: "treeNodeLinkList", predicate: ClrTreeNodeLink }], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"{{nodeId}}-check\"\n class=\"clr-checkbox\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label for=\"{{nodeId}}-check\" class=\"clr-control-label\"></label>\n </div>\n <div class=\"clr-treenode-content\" (mousedown)=\"focusTreeNode()\">\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable || ariaSelected\">\n <span *ngIf=\"ariaSelected\"> selected</span>\n <span *ngIf=\"!ariaSelected\"> unselected</span>\n </div>\n </div>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "component", type: RecursiveChildren, selector: "clr-recursive-children", inputs: ["parent", "children"] }], animations: [
18157
+ ClrTreeNode.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrTreeNode, selector: "clr-tree-node", inputs: { selected: ["clrSelected", "selected"], expandable: ["clrExpandable", "expandable"], expanded: ["clrExpanded", "expanded"], clrForTypeAhead: "clrForTypeAhead" }, outputs: { selectedChange: "clrSelectedChange", expandedChange: "clrExpandedChange" }, host: { properties: { "class.clr-tree-node": "true" } }, providers: [TREE_FEATURES_PROVIDER, IfExpandService, { provide: LoadingListener, useExisting: IfExpandService }], queries: [{ propertyName: "treeNodeLinkList", predicate: ClrTreeNodeLink }], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"{{nodeId}}-check\"\n class=\"clr-checkbox\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label for=\"{{nodeId}}-check\">\n <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n </label>\n </div>\n <div class=\"clr-treenode-content\" (mousedown)=\"focusTreeNode()\" *ngIf=\"!featuresService.selectable\">\n <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n </div>\n\n <ng-template #treenodeContent>\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable || ariaSelected\">\n <span *ngIf=\"ariaSelected\"> selected</span>\n <span *ngIf=\"!ariaSelected\"> unselected</span>\n </div>\n </ng-template>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "component", type: RecursiveChildren, selector: "clr-recursive-children", inputs: ["parent", "children"] }], animations: [
18180
18158
  trigger('toggleChildrenAnim', [
18181
18159
  transition('collapsed => expanded', [style({ height: 0 }), animate(200, style({ height: '*' }))]),
18182
18160
  transition('expanded => collapsed', [style({ height: '*' }), animate(200, style({ height: 0 }))]),
@@ -18195,7 +18173,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
18195
18173
  ]),
18196
18174
  ], host: {
18197
18175
  '[class.clr-tree-node]': 'true',
18198
- }, template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"{{nodeId}}-check\"\n class=\"clr-checkbox\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label for=\"{{nodeId}}-check\" class=\"clr-control-label\"></label>\n </div>\n <div class=\"clr-treenode-content\" (mousedown)=\"focusTreeNode()\">\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable || ariaSelected\">\n <span *ngIf=\"ariaSelected\"> selected</span>\n <span *ngIf=\"!ariaSelected\"> unselected</span>\n </div>\n </div>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n" }]
18176
+ }, template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"{{nodeId}}-check\"\n class=\"clr-checkbox\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label for=\"{{nodeId}}-check\">\n <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n </label>\n </div>\n <div class=\"clr-treenode-content\" (mousedown)=\"focusTreeNode()\" *ngIf=\"!featuresService.selectable\">\n <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n </div>\n\n <ng-template #treenodeContent>\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable || ariaSelected\">\n <span *ngIf=\"ariaSelected\"> selected</span>\n <span *ngIf=\"!ariaSelected\"> unselected</span>\n </div>\n </ng-template>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n" }]
18199
18177
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
18200
18178
  type: Inject,
18201
18179
  args: [PLATFORM_ID]
@@ -18483,10 +18461,10 @@ class DropdownFocusHandler {
18483
18461
  // whether root container or not, tab key should always toggle (i.e. close) the container
18484
18462
  this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.tab', event => this.toggleService.toggleWithEvent(event)));
18485
18463
  if (this.parent) {
18486
- // if it's a nested container, pressing esc has the same effect as pressing left key, which closes the current
18464
+ // if it's a nested container, pressing escape has the same effect as pressing left key, which closes the current
18487
18465
  // popup and moves up to its parent. Here, we stop propagation so that the parent container
18488
- // doesn't receive the esc keydown
18489
- this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.esc', event => {
18466
+ // doesn't receive the escape keydown
18467
+ this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.escape', event => {
18490
18468
  this.focusService.move(ArrowKeyDirection.LEFT);
18491
18469
  event.stopPropagation();
18492
18470
  }));
@@ -18494,8 +18472,8 @@ class DropdownFocusHandler {
18494
18472
  else {
18495
18473
  // The root container is the only one we register to the focus service, others do not need focus
18496
18474
  this.focusService.registerContainer(el);
18497
- // The root container will simply close the container when esc key is pressed
18498
- this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.esc', event => this.toggleService.toggleWithEvent(event)));
18475
+ // The root container will simply close the container when escape key is pressed
18476
+ this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.escape', event => this.toggleService.toggleWithEvent(event)));
18499
18477
  // When the user moves focus outside of the menu, we close the dropdown
18500
18478
  this._unlistenFuncs.push(this.renderer.listen(el, 'blur', event => {
18501
18479
  // we clear out any existing focus on the items
@@ -19056,7 +19034,6 @@ class Popover {
19056
19034
  * This software is released under MIT license.
19057
19035
  * The full license information can be found in LICENSE in the root directory of this project.
19058
19036
  */
19059
- // Literally any annotation would work here, but writing our own @HoneyBadger annotation feels overkill.
19060
19037
  class AbstractPopover {
19061
19038
  constructor(injector, parentHost) {
19062
19039
  this.parentHost = parentHost;
@@ -19135,7 +19112,7 @@ class AbstractPopover {
19135
19112
  this.ngZone.runOutsideAngular(() => {
19136
19113
  this.documentESCListener = this.renderer.listen('document', 'keydown', event => {
19137
19114
  if (event && event.key) {
19138
- if (event.key === 'Escape' || event.key === 'Esc') {
19115
+ if (normalizeKey(event.key) === Keys.Escape) {
19139
19116
  this.ngZone.run(() => {
19140
19117
  this.toggleService.open = false;
19141
19118
  this.ref.markForCheck();
@@ -21094,7 +21071,7 @@ ClrTabs.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0
21094
21071
  <!--tab links in overflow menu-->
21095
21072
  <clr-tab-overflow-content
21096
21073
  *ngIf="toggleService.open"
21097
- (document:keydown.esc)="closeOnEscapeKey()"
21074
+ (document:keydown.escape)="closeOnEscapeKey()"
21098
21075
  (document:click)="closeOnOutsideClick($event, tabOverflowTrigger)"
21099
21076
  (focusout)="closeOnFocusOut($event)"
21100
21077
  >
@@ -21158,7 +21135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
21158
21135
  <!--tab links in overflow menu-->
21159
21136
  <clr-tab-overflow-content
21160
21137
  *ngIf="toggleService.open"
21161
- (document:keydown.esc)="closeOnEscapeKey()"
21138
+ (document:keydown.escape)="closeOnEscapeKey()"
21162
21139
  (document:click)="closeOnOutsideClick($event, tabOverflowTrigger)"
21163
21140
  (focusout)="closeOnFocusOut($event)"
21164
21141
  >
@@ -21810,7 +21787,7 @@ class ClrModal {
21810
21787
  }
21811
21788
  }
21812
21789
  ClrModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrModal, deps: [{ token: ScrollingService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
21813
- ClrModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrModal, selector: "clr-modal", inputs: { _open: ["clrModalOpen", "_open"], closable: ["clrModalClosable", "closable"], closeButtonAriaLabel: ["clrModalCloseButtonAriaLabel", "closeButtonAriaLabel"], size: ["clrModalSize", "size"], staticBackdrop: ["clrModalStaticBackdrop", "staticBackdrop"], skipAnimation: ["clrModalSkipAnimation", "skipAnimation"], stopClose: ["clrModalPreventClose", "stopClose"], labelledBy: ["clrModalLabelledById", "labelledBy"] }, outputs: { _openChanged: "clrModalOpenChange", altClose: "clrModalAlternateClose" }, host: { listeners: { "body:keyup.escape": "close()" }, properties: { "class.open": "this._open" } }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div cdkTrapFocus class=\"modal\" *ngIf=\"_open\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n [@fadeDown]=\"skipAnimation\"\n (@fadeDown.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <div class=\"modal-title-wrapper\" id=\"{{modalId}}\" clrFocusOnViewInit>\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n\n <div [@fade] class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"staticBackdrop || close()\"></div>\n</div>\n", styles: [":host{display:none}:host.open{display:inline}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]" }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrFocusOnViewInit, selector: "[clrFocusOnViewInit]", inputs: ["clrFocusOnViewInit"] }], viewProviders: [ScrollingService], animations: [
21790
+ ClrModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrModal, selector: "clr-modal", inputs: { _open: ["clrModalOpen", "_open"], closable: ["clrModalClosable", "closable"], closeButtonAriaLabel: ["clrModalCloseButtonAriaLabel", "closeButtonAriaLabel"], size: ["clrModalSize", "size"], staticBackdrop: ["clrModalStaticBackdrop", "staticBackdrop"], skipAnimation: ["clrModalSkipAnimation", "skipAnimation"], stopClose: ["clrModalPreventClose", "stopClose"], labelledBy: ["clrModalLabelledById", "labelledBy"] }, outputs: { _openChanged: "clrModalOpenChange", altClose: "clrModalAlternateClose" }, host: { listeners: { "body:keyup.escape": "close()" }, properties: { "class.open": "this._open" } }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div cdkTrapFocus [cdkTrapFocusAutoCapture]=\"true\" class=\"modal\" *ngIf=\"_open\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n [@fadeDown]=\"skipAnimation\"\n (@fadeDown.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <div class=\"modal-title-wrapper\" id=\"{{modalId}}\" clrFocusOnViewInit>\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n\n <div [@fade] class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"staticBackdrop || close()\"></div>\n</div>\n", styles: [":host{display:none}:host.open{display:inline}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]" }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrFocusOnViewInit, selector: "[clrFocusOnViewInit]", inputs: ["clrFocusOnViewInit"] }], viewProviders: [ScrollingService], animations: [
21814
21791
  trigger('fadeDown', [
21815
21792
  transition('* => false', [style({ opacity: 0, transform: 'translate(0, -25%)' }), animate('0.2s ease-in-out')]),
21816
21793
  transition('false => *', [animate('0.2s ease-in-out', style({ opacity: 0, transform: 'translate(0, -25%)' }))]),
@@ -21831,7 +21808,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
21831
21808
  transition('void => *', [style({ opacity: 0 }), animate('0.2s ease-in-out', style({ opacity: 0.85 }))]),
21832
21809
  transition('* => void', [animate('0.2s ease-in-out', style({ opacity: 0 }))]),
21833
21810
  ]),
21834
- ], template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div cdkTrapFocus class=\"modal\" *ngIf=\"_open\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n [@fadeDown]=\"skipAnimation\"\n (@fadeDown.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <div class=\"modal-title-wrapper\" id=\"{{modalId}}\" clrFocusOnViewInit>\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n\n <div [@fade] class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"staticBackdrop || close()\"></div>\n</div>\n", styles: [":host{display:none}:host.open{display:inline}\n"] }]
21811
+ ], template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div cdkTrapFocus [cdkTrapFocusAutoCapture]=\"true\" class=\"modal\" *ngIf=\"_open\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n [@fadeDown]=\"skipAnimation\"\n (@fadeDown.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <div class=\"modal-title-wrapper\" id=\"{{modalId}}\" clrFocusOnViewInit>\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n\n <div [@fade] class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"staticBackdrop || close()\"></div>\n</div>\n", styles: [":host{display:none}:host.open{display:inline}\n"] }]
21835
21812
  }], ctorParameters: function () { return [{ type: ScrollingService }, { type: ClrCommonStringsService }]; }, propDecorators: { _open: [{
21836
21813
  type: HostBinding,
21837
21814
  args: ['class.open']
@@ -22184,6 +22161,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22184
22161
  type: Injectable
22185
22162
  }] });
22186
22163
 
22164
+ /*
22165
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
22166
+ * This software is released under MIT license.
22167
+ * The full license information can be found in LICENSE in the root directory of this project.
22168
+ */
22169
+ class TooltipMouseService {
22170
+ constructor(toggleService) {
22171
+ this.toggleService = toggleService;
22172
+ }
22173
+ onMouseEnterTrigger() {
22174
+ this.mouseOverTrigger = true;
22175
+ this.toggleService.open = true;
22176
+ }
22177
+ onMouseLeaveTrigger() {
22178
+ this.mouseOverTrigger = false;
22179
+ this.hideIfMouseOut();
22180
+ }
22181
+ onMouseEnterContent() {
22182
+ this.mouseOverContent = true;
22183
+ }
22184
+ onMouseLeaveContent() {
22185
+ this.mouseOverContent = false;
22186
+ this.hideIfMouseOut();
22187
+ }
22188
+ hideIfMouseOut() {
22189
+ // A zero timeout is used so that the code has a chance to update
22190
+ // the `mouseOverContent` property after the user moves the mouse from the trigger to the content.
22191
+ setTimeout(() => {
22192
+ if (!this.mouseOverTrigger && !this.mouseOverContent) {
22193
+ this.toggleService.open = false;
22194
+ }
22195
+ }, 0);
22196
+ }
22197
+ }
22198
+ TooltipMouseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TooltipMouseService, deps: [{ token: ClrPopoverToggleService }], target: i0.ɵɵFactoryTarget.Injectable });
22199
+ TooltipMouseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TooltipMouseService });
22200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TooltipMouseService, decorators: [{
22201
+ type: Injectable
22202
+ }], ctorParameters: function () { return [{ type: ClrPopoverToggleService }]; } });
22203
+
22187
22204
  /*
22188
22205
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
22189
22206
  * This software is released under MIT license.
@@ -22192,7 +22209,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22192
22209
  class ClrTooltip {
22193
22210
  }
22194
22211
  ClrTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltip, deps: [], target: i0.ɵɵFactoryTarget.Component });
22195
- ClrTooltip.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrTooltip, selector: "clr-tooltip", host: { properties: { "class.tooltip": "true" } }, providers: [ClrPopoverToggleService, { provide: POPOVER_HOST_ANCHOR, useExisting: ElementRef }, TooltipIdService], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
22212
+ ClrTooltip.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrTooltip, selector: "clr-tooltip", host: { properties: { "class.tooltip": "true" } }, providers: [
22213
+ ClrPopoverToggleService,
22214
+ { provide: POPOVER_HOST_ANCHOR, useExisting: ElementRef },
22215
+ TooltipIdService,
22216
+ TooltipMouseService,
22217
+ ], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
22196
22218
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltip, decorators: [{
22197
22219
  type: Component,
22198
22220
  args: [{
@@ -22201,7 +22223,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22201
22223
  host: {
22202
22224
  '[class.tooltip]': 'true',
22203
22225
  },
22204
- providers: [ClrPopoverToggleService, { provide: POPOVER_HOST_ANCHOR, useExisting: ElementRef }, TooltipIdService],
22226
+ providers: [
22227
+ ClrPopoverToggleService,
22228
+ { provide: POPOVER_HOST_ANCHOR, useExisting: ElementRef },
22229
+ TooltipIdService,
22230
+ TooltipMouseService,
22231
+ ],
22205
22232
  }]
22206
22233
  }] });
22207
22234
 
@@ -22224,9 +22251,10 @@ const SIZES = ['xs', 'sm', 'md', 'lg'];
22224
22251
  const defaultPosition = 'right';
22225
22252
  const defaultSize = 'sm';
22226
22253
  class ClrTooltipContent extends AbstractPopover {
22227
- constructor(injector, parentHost, tooltipIdService) {
22254
+ constructor(injector, parentHost, tooltipIdService, tooltipMouseService) {
22228
22255
  super(injector, parentHost);
22229
22256
  this.tooltipIdService = tooltipIdService;
22257
+ this.tooltipMouseService = tooltipMouseService;
22230
22258
  if (!parentHost) {
22231
22259
  throw new Error('clr-tooltip-content should only be used inside of a clr-tooltip');
22232
22260
  }
@@ -22292,13 +22320,19 @@ class ClrTooltipContent extends AbstractPopover {
22292
22320
  this.size = this.size || defaultSize;
22293
22321
  this.position = this.position || defaultPosition;
22294
22322
  }
22323
+ onMouseEnter() {
22324
+ this.tooltipMouseService.onMouseEnterContent();
22325
+ }
22326
+ onMouseLeave() {
22327
+ this.tooltipMouseService.onMouseLeaveContent();
22328
+ }
22295
22329
  updateCssClass({ oldClass, newClass }) {
22296
22330
  this.renderer.removeClass(this.el.nativeElement, oldClass);
22297
22331
  this.renderer.addClass(this.el.nativeElement, newClass);
22298
22332
  }
22299
22333
  }
22300
- ClrTooltipContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltipContent, deps: [{ token: i0.Injector }, { token: POPOVER_HOST_ANCHOR, optional: true }, { token: TooltipIdService }], target: i0.ɵɵFactoryTarget.Component });
22301
- ClrTooltipContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrTooltipContent, selector: "clr-tooltip-content", inputs: { id: "id", position: ["clrPosition", "position"], size: ["clrSize", "size"] }, host: { properties: { "class.tooltip-content": "true", "style.opacity": "1", "attr.role": "\"tooltip\"", "id": "id" } }, usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
22334
+ ClrTooltipContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltipContent, deps: [{ token: i0.Injector }, { token: POPOVER_HOST_ANCHOR, optional: true }, { token: TooltipIdService }, { token: TooltipMouseService }], target: i0.ɵɵFactoryTarget.Component });
22335
+ ClrTooltipContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrTooltipContent, selector: "clr-tooltip-content", inputs: { id: "id", position: ["clrPosition", "position"], size: ["clrSize", "size"] }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" }, properties: { "class.tooltip-content": "true", "style.opacity": "1", "attr.role": "\"tooltip\"", "id": "id" } }, usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
22302
22336
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltipContent, decorators: [{
22303
22337
  type: Component,
22304
22338
  args: [{
@@ -22316,7 +22350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22316
22350
  }, {
22317
22351
  type: Inject,
22318
22352
  args: [POPOVER_HOST_ANCHOR]
22319
- }] }, { type: TooltipIdService }]; }, propDecorators: { id: [{
22353
+ }] }, { type: TooltipIdService }, { type: TooltipMouseService }]; }, propDecorators: { id: [{
22320
22354
  type: Input
22321
22355
  }], position: [{
22322
22356
  type: Input,
@@ -22324,6 +22358,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22324
22358
  }], size: [{
22325
22359
  type: Input,
22326
22360
  args: ['clrSize']
22361
+ }], onMouseEnter: [{
22362
+ type: HostListener,
22363
+ args: ['mouseenter']
22364
+ }], onMouseLeave: [{
22365
+ type: HostListener,
22366
+ args: ['mouseleave']
22327
22367
  }] } });
22328
22368
 
22329
22369
  /*
@@ -22332,25 +22372,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22332
22372
  * The full license information can be found in LICENSE in the root directory of this project.
22333
22373
  */
22334
22374
  class ClrTooltipTrigger {
22335
- constructor(toggleService, tooltipIdService) {
22375
+ constructor(toggleService, tooltipIdService, tooltipMouseService) {
22336
22376
  this.toggleService = toggleService;
22337
22377
  this.tooltipIdService = tooltipIdService;
22378
+ this.tooltipMouseService = tooltipMouseService;
22338
22379
  this.subs = [];
22339
22380
  // The aria-described by comes from the id of content. It
22340
22381
  this.subs.push(this.tooltipIdService.id.subscribe(tooltipId => (this.ariaDescribedBy = tooltipId)));
22341
22382
  }
22383
+ ngOnDestroy() {
22384
+ this.subs.forEach(sub => sub.unsubscribe());
22385
+ }
22342
22386
  showTooltip() {
22343
22387
  this.toggleService.open = true;
22344
22388
  }
22345
22389
  hideTooltip() {
22346
22390
  this.toggleService.open = false;
22347
22391
  }
22348
- ngOnDestroy() {
22349
- this.subs.forEach(sub => sub.unsubscribe());
22392
+ onMouseEnter() {
22393
+ this.tooltipMouseService.onMouseEnterTrigger();
22394
+ }
22395
+ onMouseLeave() {
22396
+ this.tooltipMouseService.onMouseLeaveTrigger();
22350
22397
  }
22351
22398
  }
22352
- ClrTooltipTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltipTrigger, deps: [{ token: ClrPopoverToggleService }, { token: TooltipIdService }], target: i0.ɵɵFactoryTarget.Directive });
22353
- ClrTooltipTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrTooltipTrigger, selector: "[clrTooltipTrigger]", host: { attributes: { "tabindex": "0" }, listeners: { "mouseenter": "showTooltip()", "focus": "showTooltip()", "mouseleave": "hideTooltip()", "blur": "hideTooltip()" }, properties: { "class.tooltip-trigger": "true", "attr.aria-describedby": "ariaDescribedBy", "attr.role": "\"button\"" } }, ngImport: i0 });
22399
+ ClrTooltipTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltipTrigger, deps: [{ token: ClrPopoverToggleService }, { token: TooltipIdService }, { token: TooltipMouseService }], target: i0.ɵɵFactoryTarget.Directive });
22400
+ ClrTooltipTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrTooltipTrigger, selector: "[clrTooltipTrigger]", host: { attributes: { "tabindex": "0" }, listeners: { "focus": "showTooltip()", "blur": "hideTooltip()", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" }, properties: { "class.tooltip-trigger": "true", "attr.aria-describedby": "ariaDescribedBy", "attr.role": "\"button\"" } }, ngImport: i0 });
22354
22401
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltipTrigger, decorators: [{
22355
22402
  type: Directive,
22356
22403
  args: [{
@@ -22362,18 +22409,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22362
22409
  '[attr.role]': '"button"',
22363
22410
  },
22364
22411
  }]
22365
- }], ctorParameters: function () { return [{ type: ClrPopoverToggleService }, { type: TooltipIdService }]; }, propDecorators: { showTooltip: [{
22366
- type: HostListener,
22367
- args: ['mouseenter']
22368
- }, {
22412
+ }], ctorParameters: function () { return [{ type: ClrPopoverToggleService }, { type: TooltipIdService }, { type: TooltipMouseService }]; }, propDecorators: { showTooltip: [{
22369
22413
  type: HostListener,
22370
22414
  args: ['focus']
22371
22415
  }], hideTooltip: [{
22372
- type: HostListener,
22373
- args: ['mouseleave']
22374
- }, {
22375
22416
  type: HostListener,
22376
22417
  args: ['blur']
22418
+ }], onMouseEnter: [{
22419
+ type: HostListener,
22420
+ args: ['mouseenter']
22421
+ }], onMouseLeave: [{
22422
+ type: HostListener,
22423
+ args: ['mouseleave']
22377
22424
  }] } });
22378
22425
 
22379
22426
  /*