@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
@@ -315,7 +315,6 @@ const commonStringsDefault = {
315
315
  alertCloseButtonAriaLabel: 'Close alert',
316
316
  // Date Picker
317
317
  datepickerDialogLabel: 'Choose date',
318
- datepickerToggle: 'Toggle datepicker',
319
318
  datepickerToggleChooseDateLabel: 'Choose date',
320
319
  datepickerToggleChangeDateLabel: 'Change date, {SELECTED_DATE}',
321
320
  datepickerPreviousMonth: 'Previous month',
@@ -1328,69 +1327,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
1328
1327
  * This software is released under MIT license.
1329
1328
  * The full license information can be found in LICENSE in the root directory of this project.
1330
1329
  */
1331
- var KeyCodes;
1332
- (function (KeyCodes) {
1333
- KeyCodes["ArrowLeft"] = "ArrowLeft";
1334
- KeyCodes["ArrowUp"] = "ArrowUp";
1335
- KeyCodes["ArrowRight"] = "ArrowRight";
1336
- KeyCodes["ArrowDown"] = "ArrowDown";
1337
- KeyCodes["Backspace"] = "Backspace";
1338
- KeyCodes["Tab"] = "Tab";
1339
- KeyCodes["Enter"] = "Enter";
1340
- KeyCodes["Escape"] = "Escape";
1341
- KeyCodes["Space"] = "Space";
1342
- KeyCodes["Spacebar"] = " ";
1343
- KeyCodes["Home"] = "Home";
1344
- KeyCodes["End"] = "End";
1345
- })(KeyCodes || (KeyCodes = {}));
1346
- var IEKeyCodes;
1347
- (function (IEKeyCodes) {
1348
- IEKeyCodes["ArrowUp"] = "Up";
1349
- IEKeyCodes["ArrowDown"] = "Down";
1350
- IEKeyCodes["ArrowRight"] = "Right";
1351
- IEKeyCodes["ArrowLeft"] = "Left";
1352
- IEKeyCodes["Space"] = "Spacebar";
1353
- IEKeyCodes["Escape"] = "Esc";
1354
- IEKeyCodes["Home"] = "Home";
1355
- IEKeyCodes["End"] = "End";
1356
- IEKeyCodes["Enter"] = "Enter";
1357
- IEKeyCodes["Tab"] = "Tab";
1358
- })(IEKeyCodes || (IEKeyCodes = {}));
1330
+ var Keys;
1331
+ (function (Keys) {
1332
+ Keys["ArrowLeft"] = "ArrowLeft";
1333
+ Keys["ArrowUp"] = "ArrowUp";
1334
+ Keys["ArrowRight"] = "ArrowRight";
1335
+ Keys["ArrowDown"] = "ArrowDown";
1336
+ Keys["Backspace"] = "Backspace";
1337
+ Keys["Tab"] = "Tab";
1338
+ Keys["Enter"] = "Enter";
1339
+ Keys["Escape"] = "Escape";
1340
+ Keys["Space"] = "Space";
1341
+ Keys["Spacebar"] = " ";
1342
+ Keys["Home"] = "Home";
1343
+ Keys["End"] = "End";
1344
+ })(Keys || (Keys = {}));
1345
+ var IEKeys;
1346
+ (function (IEKeys) {
1347
+ IEKeys["ArrowUp"] = "Up";
1348
+ IEKeys["ArrowDown"] = "Down";
1349
+ IEKeys["ArrowRight"] = "Right";
1350
+ IEKeys["ArrowLeft"] = "Left";
1351
+ IEKeys["Space"] = "Spacebar";
1352
+ IEKeys["Escape"] = "Esc";
1353
+ })(IEKeys || (IEKeys = {}));
1359
1354
 
1360
1355
  /*
1361
1356
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
1362
1357
  * This software is released under MIT license.
1363
1358
  * The full license information can be found in LICENSE in the root directory of this project.
1364
1359
  */
1365
- function keyValidator(key) {
1366
- if (key === KeyCodes.ArrowUp || key === IEKeyCodes.ArrowUp) {
1367
- return KeyCodes.ArrowUp;
1360
+ function normalizeKey(key) {
1361
+ if (key === Keys.ArrowUp || key === IEKeys.ArrowUp) {
1362
+ return Keys.ArrowUp;
1368
1363
  }
1369
- else if (key === KeyCodes.ArrowDown || key === IEKeyCodes.ArrowDown) {
1370
- return KeyCodes.ArrowDown;
1364
+ else if (key === Keys.ArrowDown || key === IEKeys.ArrowDown) {
1365
+ return Keys.ArrowDown;
1371
1366
  }
1372
- else if (key === KeyCodes.ArrowRight || key === IEKeyCodes.ArrowRight) {
1373
- return KeyCodes.ArrowRight;
1367
+ else if (key === Keys.ArrowRight || key === IEKeys.ArrowRight) {
1368
+ return Keys.ArrowRight;
1374
1369
  }
1375
- else if (key === KeyCodes.ArrowLeft || key === IEKeyCodes.ArrowLeft) {
1376
- return KeyCodes.ArrowLeft;
1370
+ else if (key === Keys.ArrowLeft || key === IEKeys.ArrowLeft) {
1371
+ return Keys.ArrowLeft;
1377
1372
  }
1378
- else if (key === KeyCodes.Space || key === IEKeyCodes.Space) {
1379
- return KeyCodes.Space;
1373
+ else if (key === Keys.Space || key === IEKeys.Space) {
1374
+ return Keys.Space;
1380
1375
  }
1381
- else if (key === KeyCodes.Escape || key === IEKeyCodes.Escape) {
1382
- return KeyCodes.Escape;
1376
+ else if (key === Keys.Escape || key === IEKeys.Escape) {
1377
+ return Keys.Escape;
1383
1378
  }
1384
1379
  else {
1385
1380
  return key;
1386
1381
  }
1387
1382
  }
1388
1383
  function preventArrowKeyScroll(event) {
1389
- const validKey = keyValidator(event.key);
1390
- if (validKey === KeyCodes.ArrowUp ||
1391
- validKey === KeyCodes.ArrowDown ||
1392
- validKey === KeyCodes.ArrowLeft ||
1393
- validKey === KeyCodes.ArrowRight) {
1384
+ const key = normalizeKey(event.key);
1385
+ if (key === Keys.ArrowUp || key === Keys.ArrowDown || key === Keys.ArrowLeft || key === Keys.ArrowRight) {
1394
1386
  // prevent element container scroll
1395
1387
  // MDN references this is really the only way to prevent native browser interactions
1396
1388
  // https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets
@@ -5002,10 +4994,10 @@ class ClrKeyFocus {
5002
4994
  else if (this.nextKeyPressed(event) && this.currentFocusIsNotLastItem()) {
5003
4995
  this.moveTo(this.current + 1);
5004
4996
  }
5005
- else if (event.code === KeyCodes.Home) {
4997
+ else if (event.code === Keys.Home) {
5006
4998
  this.moveTo(0);
5007
4999
  }
5008
- else if (event.code === KeyCodes.End) {
5000
+ else if (event.code === Keys.End) {
5009
5001
  this.moveTo(this.focusableItems.length - 1);
5010
5002
  }
5011
5003
  preventArrowKeyScroll(event);
@@ -5053,27 +5045,27 @@ class ClrKeyFocus {
5053
5045
  });
5054
5046
  }
5055
5047
  nextKeyPressed(event) {
5056
- const key = keyValidator(event.key);
5048
+ const key = normalizeKey(event.key);
5057
5049
  switch (this.direction) {
5058
5050
  case ClrFocusDirection.VERTICAL:
5059
- return key === KeyCodes.ArrowDown;
5051
+ return key === Keys.ArrowDown;
5060
5052
  case ClrFocusDirection.HORIZONTAL:
5061
- return key === KeyCodes.ArrowRight;
5053
+ return key === Keys.ArrowRight;
5062
5054
  case ClrFocusDirection.BOTH:
5063
- return key === KeyCodes.ArrowDown || key === KeyCodes.ArrowRight;
5055
+ return key === Keys.ArrowDown || key === Keys.ArrowRight;
5064
5056
  default:
5065
5057
  return false;
5066
5058
  }
5067
5059
  }
5068
5060
  prevKeyPressed(event) {
5069
- const key = keyValidator(event.key);
5061
+ const key = normalizeKey(event.key);
5070
5062
  switch (this.direction) {
5071
5063
  case ClrFocusDirection.VERTICAL:
5072
- return key === KeyCodes.ArrowUp;
5064
+ return key === Keys.ArrowUp;
5073
5065
  case ClrFocusDirection.HORIZONTAL:
5074
- return key === KeyCodes.ArrowLeft;
5066
+ return key === Keys.ArrowLeft;
5075
5067
  case ClrFocusDirection.BOTH:
5076
- return key === KeyCodes.ArrowUp || key === KeyCodes.ArrowLeft;
5068
+ return key === Keys.ArrowUp || key === Keys.ArrowLeft;
5077
5069
  default:
5078
5070
  return false;
5079
5071
  }
@@ -5141,10 +5133,10 @@ class ClrRovingTabindex extends ClrKeyFocus {
5141
5133
  else if (this.nextKeyPressed(event) && this.currentFocusIsNotLastItem()) {
5142
5134
  this.updateTabindex(this.current + 1);
5143
5135
  }
5144
- else if (event.code === KeyCodes.Home) {
5136
+ else if (event.code === Keys.Home) {
5145
5137
  this.updateTabindex(0);
5146
5138
  }
5147
- else if (event.code === KeyCodes.End) {
5139
+ else if (event.code === Keys.End) {
5148
5140
  this.updateTabindex(this.focusableItems.length - 1);
5149
5141
  }
5150
5142
  super.handleKeyboardEvent(event);
@@ -5338,22 +5330,6 @@ const FOCUS_SERVICE_PROVIDER = {
5338
5330
  deps: [[new Optional(), new SkipSelf(), FocusService$1], Renderer2],
5339
5331
  };
5340
5332
 
5341
- /*
5342
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
5343
- * This software is released under MIT license.
5344
- * The full license information can be found in LICENSE in the root directory of this project.
5345
- */
5346
- const UP_ARROW = 38;
5347
- const DOWN_ARROW = 40;
5348
- const RIGHT_ARROW = 39;
5349
- const LEFT_ARROW = 37;
5350
- const ENTER = 13;
5351
- const SPACE = 32;
5352
- const SHIFT = 16;
5353
- const TAB = 9;
5354
- const ESC = 27;
5355
- const BACKSPACE = 8;
5356
-
5357
5333
  /*
5358
5334
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
5359
5335
  * This software is released under MIT license.
@@ -5807,10 +5783,10 @@ class ComboboxFocusHandler {
5807
5783
  // this service is only interested in keys that may move the focus
5808
5784
  handleTextInput(event) {
5809
5785
  let preventDefault = false;
5810
- const key = keyValidator(event.key);
5786
+ const key = normalizeKey(event.key);
5811
5787
  if (event) {
5812
5788
  switch (key) {
5813
- case KeyCodes.Enter:
5789
+ case Keys.Enter:
5814
5790
  if (this.toggleService.open && this.pseudoFocus.model) {
5815
5791
  if (this.selectionService.multiselectable) {
5816
5792
  this.selectionService.toggle(this.pseudoFocus.model.value);
@@ -5821,27 +5797,27 @@ class ComboboxFocusHandler {
5821
5797
  preventDefault = true;
5822
5798
  }
5823
5799
  break;
5824
- case KeyCodes.Space:
5800
+ case Keys.Space:
5825
5801
  if (!this.toggleService.open) {
5826
5802
  this.toggleService.open = true;
5827
5803
  preventDefault = true;
5828
5804
  }
5829
5805
  break;
5830
- case KeyCodes.ArrowUp:
5806
+ case Keys.ArrowUp:
5831
5807
  this.preventViewportScrolling(event);
5832
5808
  this.openAndMoveTo(ArrowKeyDirection.UP);
5833
5809
  preventDefault = true;
5834
5810
  break;
5835
- case KeyCodes.ArrowDown:
5811
+ case Keys.ArrowDown:
5836
5812
  this.preventViewportScrolling(event);
5837
5813
  this.openAndMoveTo(ArrowKeyDirection.DOWN);
5838
5814
  preventDefault = true;
5839
5815
  break;
5840
5816
  default:
5841
5817
  // Any other keypress
5842
- if (event.key !== KeyCodes.Tab &&
5843
- !(this.selectionService.multiselectable && event.key === KeyCodes.Backspace) &&
5844
- !(event.key === KeyCodes.Escape) &&
5818
+ if (event.key !== Keys.Tab &&
5819
+ !(this.selectionService.multiselectable && event.key === Keys.Backspace) &&
5820
+ !(event.key === Keys.Escape) &&
5845
5821
  !this.toggleService.open) {
5846
5822
  this.toggleService.open = true;
5847
5823
  }
@@ -6294,7 +6270,7 @@ class ClrCombobox extends WrappedFormControl {
6294
6270
  }
6295
6271
  onKeyUp(event) {
6296
6272
  // if BACKSPACE in multiselect mode, delete the last pill if text is empty
6297
- if (event.keyCode === BACKSPACE && this.multiSelect && this._searchText.length === 0) {
6273
+ if (event.key === Keys.Backspace && this.multiSelect && this._searchText.length === 0) {
6298
6274
  const multiModel = this.optionSelectionService.selectionModel.model;
6299
6275
  if (multiModel && multiModel.length > 0) {
6300
6276
  const lastItem = multiModel[multiModel.length - 1];
@@ -8076,20 +8052,20 @@ class ClrCalendar {
8076
8052
  */
8077
8053
  onKeyDown(event) {
8078
8054
  if (event && this.focusedDay) {
8079
- switch (event.keyCode) {
8080
- case UP_ARROW:
8055
+ switch (normalizeKey(event.key)) {
8056
+ case Keys.ArrowUp:
8081
8057
  event.preventDefault();
8082
8058
  this._dateNavigationService.incrementFocusDay(-1 * NO_OF_DAYS_IN_A_WEEK);
8083
8059
  break;
8084
- case DOWN_ARROW:
8060
+ case Keys.ArrowDown:
8085
8061
  event.preventDefault();
8086
8062
  this._dateNavigationService.incrementFocusDay(NO_OF_DAYS_IN_A_WEEK);
8087
8063
  break;
8088
- case LEFT_ARROW:
8064
+ case Keys.ArrowLeft:
8089
8065
  event.preventDefault();
8090
8066
  this._dateNavigationService.incrementFocusDay(-1);
8091
8067
  break;
8092
- case RIGHT_ARROW:
8068
+ case Keys.ArrowRight:
8093
8069
  event.preventDefault();
8094
8070
  this._dateNavigationService.incrementFocusDay(1);
8095
8071
  break;
@@ -8274,23 +8250,23 @@ class ClrMonthpicker {
8274
8250
  // the logic is fairly simple and it didn't make sense for me
8275
8251
  // to create extra observables just to move this logic to the service.
8276
8252
  if (event) {
8277
- const keyCode = event.keyCode;
8278
- if (keyCode === UP_ARROW && this._focusedMonthIndex > 0) {
8253
+ const key = normalizeKey(event.key);
8254
+ if (key === Keys.ArrowUp && this._focusedMonthIndex > 0) {
8279
8255
  event.preventDefault();
8280
8256
  this._focusedMonthIndex--;
8281
8257
  this._datepickerFocusService.focusCell(this._elRef);
8282
8258
  }
8283
- else if (keyCode === DOWN_ARROW && this._focusedMonthIndex < 11) {
8259
+ else if (key === Keys.ArrowDown && this._focusedMonthIndex < 11) {
8284
8260
  event.preventDefault();
8285
8261
  this._focusedMonthIndex++;
8286
8262
  this._datepickerFocusService.focusCell(this._elRef);
8287
8263
  }
8288
- else if (keyCode === RIGHT_ARROW && this._focusedMonthIndex < 6) {
8264
+ else if (key === Keys.ArrowRight && this._focusedMonthIndex < 6) {
8289
8265
  event.preventDefault();
8290
8266
  this._focusedMonthIndex = this._focusedMonthIndex + 6;
8291
8267
  this._datepickerFocusService.focusCell(this._elRef);
8292
8268
  }
8293
- else if (keyCode === LEFT_ARROW && this._focusedMonthIndex > 5) {
8269
+ else if (key === Keys.ArrowLeft && this._focusedMonthIndex > 5) {
8294
8270
  event.preventDefault();
8295
8271
  this._focusedMonthIndex = this._focusedMonthIndex - 6;
8296
8272
  this._datepickerFocusService.focusCell(this._elRef);
@@ -8494,20 +8470,20 @@ class ClrYearpicker {
8494
8470
  // the logic is fairly simple and it didn't make sense for me
8495
8471
  // to create extra observables just to move this logic to the service.
8496
8472
  if (event) {
8497
- const keyCode = event.keyCode;
8498
- if (keyCode === UP_ARROW) {
8473
+ const key = normalizeKey(event.key);
8474
+ if (key === Keys.ArrowUp) {
8499
8475
  event.preventDefault();
8500
8476
  this.incrementFocusYearBy(-1);
8501
8477
  }
8502
- else if (keyCode === DOWN_ARROW) {
8478
+ else if (key === Keys.ArrowDown) {
8503
8479
  event.preventDefault();
8504
8480
  this.incrementFocusYearBy(1);
8505
8481
  }
8506
- else if (keyCode === RIGHT_ARROW) {
8482
+ else if (key === Keys.ArrowRight) {
8507
8483
  event.preventDefault();
8508
8484
  this.incrementFocusYearBy(5);
8509
8485
  }
8510
- else if (keyCode === LEFT_ARROW) {
8486
+ else if (key === Keys.ArrowLeft) {
8511
8487
  event.preventDefault();
8512
8488
  this.incrementFocusYearBy(-5);
8513
8489
  }
@@ -8801,11 +8777,11 @@ class ClrDateContainer extends ClrAbstractContainer {
8801
8777
  getToggleButtonLabel(day) {
8802
8778
  if (day) {
8803
8779
  const formattedDate = this.dateIOService.toLocaleDisplayFormatString(day.toDate());
8804
- return (this.commonStrings.parse(this.commonStrings.keys.datepickerToggleChangeDateLabel, {
8780
+ return this.commonStrings.parse(this.commonStrings.keys.datepickerToggleChangeDateLabel, {
8805
8781
  SELECTED_DATE: formattedDate,
8806
- }) || this.commonStrings.keys.datepickerToggle);
8782
+ });
8807
8783
  }
8808
- return this.commonStrings.keys.datepickerToggleChooseDateLabel || this.commonStrings.keys.datepickerToggle;
8784
+ return this.commonStrings.keys.datepickerToggleChooseDateLabel;
8809
8785
  }
8810
8786
  listenForDateChanges() {
8811
8787
  // because date-input.ts initializes the input in ngAfterViewInit,
@@ -12370,10 +12346,10 @@ class ClrDatagridColumnSeparator {
12370
12346
  }
12371
12347
  }
12372
12348
  isArrowLeftKeyEvent(event) {
12373
- return event.key === KeyCodes.ArrowLeft || event.key === IEKeyCodes.ArrowLeft;
12349
+ return normalizeKey(event.key) === Keys.ArrowLeft;
12374
12350
  }
12375
12351
  isArrowRightKeyEvent(event) {
12376
- return event.key === KeyCodes.ArrowRight || event.key === IEKeyCodes.ArrowRight;
12352
+ return normalizeKey(event.key) === Keys.ArrowRight;
12377
12353
  }
12378
12354
  ngOnDestroy() {
12379
12355
  this.unlisteners.forEach(unlistener => unlistener());
@@ -15337,12 +15313,12 @@ class ClrDatagridDetail {
15337
15313
  this.detailService = detailService;
15338
15314
  this.commonStrings = commonStrings;
15339
15315
  }
15340
- closeCheck() {
15316
+ close() {
15341
15317
  this.detailService.close();
15342
15318
  }
15343
15319
  }
15344
15320
  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 });
15345
- 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: `
15321
+ 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: `
15346
15322
  <div
15347
15323
  cdkTrapFocus
15348
15324
  [cdkTrapFocusAutoCapture]="true"
@@ -15387,9 +15363,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
15387
15363
  }], ctorParameters: function () { return [{ type: DetailService }, { type: ClrCommonStringsService }]; }, propDecorators: { header: [{
15388
15364
  type: ContentChild,
15389
15365
  args: [ClrDatagridDetailHeader]
15390
- }], closeCheck: [{
15366
+ }], close: [{
15391
15367
  type: HostListener,
15392
- args: ['document:keyup.esc']
15368
+ args: ['document:keyup.escape']
15393
15369
  }] } });
15394
15370
 
15395
15371
  /*
@@ -15884,19 +15860,19 @@ class ClrDatagridPageSize {
15884
15860
  }
15885
15861
  ClrDatagridPageSize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridPageSize, deps: [{ token: Page }], target: i0.ɵɵFactoryTarget.Component });
15886
15862
  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: `
15887
- <ng-content></ng-content>
15863
+ <label [for]="pageSizeOptionsId"><ng-content></ng-content></label>
15888
15864
  <div class="clr-select-wrapper">
15889
15865
  <select [id]="pageSizeOptionsId" [class.clr-page-size-select]="true" [(ngModel)]="page.size">
15890
15866
  <option *ngFor="let option of pageSizeOptions" [ngValue]="option">{{ option }}</option>
15891
15867
  </select>
15892
15868
  </div>
15893
- `, 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"] }] });
15869
+ `, 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"] }] });
15894
15870
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridPageSize, decorators: [{
15895
15871
  type: Component,
15896
15872
  args: [{
15897
15873
  selector: 'clr-dg-page-size',
15898
15874
  template: `
15899
- <ng-content></ng-content>
15875
+ <label [for]="pageSizeOptionsId"><ng-content></ng-content></label>
15900
15876
  <div class="clr-select-wrapper">
15901
15877
  <select [id]="pageSizeOptionsId" [class.clr-page-size-select]="true" [(ngModel)]="page.size">
15902
15878
  <option *ngFor="let option of pageSizeOptions" [ngValue]="option">{{ option }}</option>
@@ -18163,15 +18139,17 @@ class ClrTreeNode {
18163
18139
  this.subscriptions.push(this._model.loading$.pipe(debounceTime(0)).subscribe(isLoading => (this.isModelLoading = isLoading)));
18164
18140
  }
18165
18141
  ngAfterContentInit() {
18166
- if (!this._model.textContent) {
18167
- this._model.textContent = trimAndLowerCase(this.elementRef.nativeElement.textContent);
18168
- }
18169
18142
  this.subscriptions.push(this.typeAheadKeyEvent.pipe(debounceTime(TREE_TYPE_AHEAD_TIMEOUT)).subscribe((bufferedKeys) => {
18170
18143
  this.focusManager.focusNodeStartsWith(bufferedKeys, this._model);
18171
18144
  // reset once bufferedKeys are used
18172
18145
  this.typeAheadKeyBuffer = '';
18173
18146
  }));
18174
18147
  }
18148
+ ngAfterViewInit() {
18149
+ if (!this._model.textContent) {
18150
+ this._model.textContent = trimAndLowerCase(this.elementRef.nativeElement.textContent);
18151
+ }
18152
+ }
18175
18153
  ngOnDestroy() {
18176
18154
  this._model.destroy();
18177
18155
  this.subscriptions.forEach(sub => sub.unsubscribe());
@@ -18206,32 +18184,32 @@ class ClrTreeNode {
18206
18184
  // By default, pressing arrow key makes AT focus go into the nested content of the item.
18207
18185
  preventArrowKeyScroll(event);
18208
18186
  // https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-22
18209
- switch (keyValidator(event.key)) {
18210
- case KeyCodes.ArrowUp:
18187
+ switch (normalizeKey(event.key)) {
18188
+ case Keys.ArrowUp:
18211
18189
  this.focusManager.focusNodeAbove(this._model);
18212
18190
  break;
18213
- case KeyCodes.ArrowDown:
18191
+ case Keys.ArrowDown:
18214
18192
  this.focusManager.focusNodeBelow(this._model);
18215
18193
  break;
18216
- case KeyCodes.ArrowRight:
18194
+ case Keys.ArrowRight:
18217
18195
  this.expandOrFocusFirstChild();
18218
18196
  break;
18219
- case KeyCodes.ArrowLeft:
18197
+ case Keys.ArrowLeft:
18220
18198
  this.collapseOrFocusParent();
18221
18199
  break;
18222
- case KeyCodes.Home:
18200
+ case Keys.Home:
18223
18201
  event.preventDefault();
18224
18202
  this.focusManager.focusFirstVisibleNode();
18225
18203
  break;
18226
- case KeyCodes.End:
18204
+ case Keys.End:
18227
18205
  event.preventDefault();
18228
18206
  this.focusManager.focusLastVisibleNode();
18229
18207
  break;
18230
- case KeyCodes.Enter:
18208
+ case Keys.Enter:
18231
18209
  this.toggleExpandOrTriggerDefault();
18232
18210
  break;
18233
- case KeyCodes.Space:
18234
- case KeyCodes.Spacebar:
18211
+ case Keys.Space:
18212
+ case Keys.Spacebar:
18235
18213
  // to prevent scrolling on space key in this specific case
18236
18214
  event.preventDefault();
18237
18215
  this.toggleExpandOrTriggerDefault();
@@ -18293,7 +18271,7 @@ class ClrTreeNode {
18293
18271
  }
18294
18272
  }
18295
18273
  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 });
18296
- 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: [
18274
+ 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: [
18297
18275
  trigger('toggleChildrenAnim', [
18298
18276
  transition('collapsed => expanded', [style({ height: 0 }), animate(200, style({ height: '*' }))]),
18299
18277
  transition('expanded => collapsed', [style({ height: '*' }), animate(200, style({ height: 0 }))]),
@@ -18312,7 +18290,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
18312
18290
  ]),
18313
18291
  ], host: {
18314
18292
  '[class.clr-tree-node]': 'true',
18315
- }, 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" }]
18293
+ }, 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" }]
18316
18294
  }], ctorParameters: function () {
18317
18295
  return [{ type: undefined, decorators: [{
18318
18296
  type: Inject,
@@ -18602,10 +18580,10 @@ class DropdownFocusHandler {
18602
18580
  // whether root container or not, tab key should always toggle (i.e. close) the container
18603
18581
  this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.tab', event => this.toggleService.toggleWithEvent(event)));
18604
18582
  if (this.parent) {
18605
- // if it's a nested container, pressing esc has the same effect as pressing left key, which closes the current
18583
+ // if it's a nested container, pressing escape has the same effect as pressing left key, which closes the current
18606
18584
  // popup and moves up to its parent. Here, we stop propagation so that the parent container
18607
- // doesn't receive the esc keydown
18608
- this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.esc', event => {
18585
+ // doesn't receive the escape keydown
18586
+ this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.escape', event => {
18609
18587
  this.focusService.move(ArrowKeyDirection.LEFT);
18610
18588
  event.stopPropagation();
18611
18589
  }));
@@ -18613,8 +18591,8 @@ class DropdownFocusHandler {
18613
18591
  else {
18614
18592
  // The root container is the only one we register to the focus service, others do not need focus
18615
18593
  this.focusService.registerContainer(el);
18616
- // The root container will simply close the container when esc key is pressed
18617
- this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.esc', event => this.toggleService.toggleWithEvent(event)));
18594
+ // The root container will simply close the container when escape key is pressed
18595
+ this._unlistenFuncs.push(this.renderer.listen(el, 'keydown.escape', event => this.toggleService.toggleWithEvent(event)));
18618
18596
  // When the user moves focus outside of the menu, we close the dropdown
18619
18597
  this._unlistenFuncs.push(this.renderer.listen(el, 'blur', event => {
18620
18598
  // we clear out any existing focus on the items
@@ -19181,7 +19159,6 @@ class Popover {
19181
19159
  * This software is released under MIT license.
19182
19160
  * The full license information can be found in LICENSE in the root directory of this project.
19183
19161
  */
19184
- // Literally any annotation would work here, but writing our own @HoneyBadger annotation feels overkill.
19185
19162
  class AbstractPopover {
19186
19163
  constructor(injector, parentHost) {
19187
19164
  this.parentHost = parentHost;
@@ -19260,7 +19237,7 @@ class AbstractPopover {
19260
19237
  this.ngZone.runOutsideAngular(() => {
19261
19238
  this.documentESCListener = this.renderer.listen('document', 'keydown', event => {
19262
19239
  if (event && event.key) {
19263
- if (event.key === 'Escape' || event.key === 'Esc') {
19240
+ if (normalizeKey(event.key) === Keys.Escape) {
19264
19241
  this.ngZone.run(() => {
19265
19242
  this.toggleService.open = false;
19266
19243
  this.ref.markForCheck();
@@ -21240,7 +21217,7 @@ ClrTabs.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0
21240
21217
  <!--tab links in overflow menu-->
21241
21218
  <clr-tab-overflow-content
21242
21219
  *ngIf="toggleService.open"
21243
- (document:keydown.esc)="closeOnEscapeKey()"
21220
+ (document:keydown.escape)="closeOnEscapeKey()"
21244
21221
  (document:click)="closeOnOutsideClick($event, tabOverflowTrigger)"
21245
21222
  (focusout)="closeOnFocusOut($event)"
21246
21223
  >
@@ -21304,7 +21281,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
21304
21281
  <!--tab links in overflow menu-->
21305
21282
  <clr-tab-overflow-content
21306
21283
  *ngIf="toggleService.open"
21307
- (document:keydown.esc)="closeOnEscapeKey()"
21284
+ (document:keydown.escape)="closeOnEscapeKey()"
21308
21285
  (document:click)="closeOnOutsideClick($event, tabOverflowTrigger)"
21309
21286
  (focusout)="closeOnFocusOut($event)"
21310
21287
  >
@@ -21962,7 +21939,7 @@ class ClrModal {
21962
21939
  }
21963
21940
  }
21964
21941
  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 });
21965
- 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: [
21942
+ 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: [
21966
21943
  trigger('fadeDown', [
21967
21944
  transition('* => false', [style({ opacity: 0, transform: 'translate(0, -25%)' }), animate('0.2s ease-in-out')]),
21968
21945
  transition('false => *', [animate('0.2s ease-in-out', style({ opacity: 0, transform: 'translate(0, -25%)' }))]),
@@ -21983,7 +21960,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
21983
21960
  transition('void => *', [style({ opacity: 0 }), animate('0.2s ease-in-out', style({ opacity: 0.85 }))]),
21984
21961
  transition('* => void', [animate('0.2s ease-in-out', style({ opacity: 0 }))]),
21985
21962
  ]),
21986
- ], 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"] }]
21963
+ ], 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"] }]
21987
21964
  }], ctorParameters: function () { return [{ type: ScrollingService }, { type: ClrCommonStringsService }]; }, propDecorators: { _open: [{
21988
21965
  type: HostBinding,
21989
21966
  args: ['class.open']
@@ -22338,6 +22315,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22338
22315
  type: Injectable
22339
22316
  }] });
22340
22317
 
22318
+ /*
22319
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
22320
+ * This software is released under MIT license.
22321
+ * The full license information can be found in LICENSE in the root directory of this project.
22322
+ */
22323
+ class TooltipMouseService {
22324
+ constructor(toggleService) {
22325
+ this.toggleService = toggleService;
22326
+ }
22327
+ onMouseEnterTrigger() {
22328
+ this.mouseOverTrigger = true;
22329
+ this.toggleService.open = true;
22330
+ }
22331
+ onMouseLeaveTrigger() {
22332
+ this.mouseOverTrigger = false;
22333
+ this.hideIfMouseOut();
22334
+ }
22335
+ onMouseEnterContent() {
22336
+ this.mouseOverContent = true;
22337
+ }
22338
+ onMouseLeaveContent() {
22339
+ this.mouseOverContent = false;
22340
+ this.hideIfMouseOut();
22341
+ }
22342
+ hideIfMouseOut() {
22343
+ // A zero timeout is used so that the code has a chance to update
22344
+ // the `mouseOverContent` property after the user moves the mouse from the trigger to the content.
22345
+ setTimeout(() => {
22346
+ if (!this.mouseOverTrigger && !this.mouseOverContent) {
22347
+ this.toggleService.open = false;
22348
+ }
22349
+ }, 0);
22350
+ }
22351
+ }
22352
+ TooltipMouseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TooltipMouseService, deps: [{ token: ClrPopoverToggleService }], target: i0.ɵɵFactoryTarget.Injectable });
22353
+ TooltipMouseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TooltipMouseService });
22354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TooltipMouseService, decorators: [{
22355
+ type: Injectable
22356
+ }], ctorParameters: function () { return [{ type: ClrPopoverToggleService }]; } });
22357
+
22341
22358
  /*
22342
22359
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
22343
22360
  * This software is released under MIT license.
@@ -22346,7 +22363,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22346
22363
  class ClrTooltip {
22347
22364
  }
22348
22365
  ClrTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltip, deps: [], target: i0.ɵɵFactoryTarget.Component });
22349
- 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 });
22366
+ ClrTooltip.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrTooltip, selector: "clr-tooltip", host: { properties: { "class.tooltip": "true" } }, providers: [
22367
+ ClrPopoverToggleService,
22368
+ { provide: POPOVER_HOST_ANCHOR, useExisting: ElementRef },
22369
+ TooltipIdService,
22370
+ TooltipMouseService,
22371
+ ], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
22350
22372
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltip, decorators: [{
22351
22373
  type: Component,
22352
22374
  args: [{
@@ -22355,7 +22377,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22355
22377
  host: {
22356
22378
  '[class.tooltip]': 'true',
22357
22379
  },
22358
- providers: [ClrPopoverToggleService, { provide: POPOVER_HOST_ANCHOR, useExisting: ElementRef }, TooltipIdService],
22380
+ providers: [
22381
+ ClrPopoverToggleService,
22382
+ { provide: POPOVER_HOST_ANCHOR, useExisting: ElementRef },
22383
+ TooltipIdService,
22384
+ TooltipMouseService,
22385
+ ],
22359
22386
  }]
22360
22387
  }] });
22361
22388
 
@@ -22378,9 +22405,10 @@ const SIZES = ['xs', 'sm', 'md', 'lg'];
22378
22405
  const defaultPosition = 'right';
22379
22406
  const defaultSize = 'sm';
22380
22407
  class ClrTooltipContent extends AbstractPopover {
22381
- constructor(injector, parentHost, tooltipIdService) {
22408
+ constructor(injector, parentHost, tooltipIdService, tooltipMouseService) {
22382
22409
  super(injector, parentHost);
22383
22410
  this.tooltipIdService = tooltipIdService;
22411
+ this.tooltipMouseService = tooltipMouseService;
22384
22412
  if (!parentHost) {
22385
22413
  throw new Error('clr-tooltip-content should only be used inside of a clr-tooltip');
22386
22414
  }
@@ -22446,13 +22474,19 @@ class ClrTooltipContent extends AbstractPopover {
22446
22474
  this.size = this.size || defaultSize;
22447
22475
  this.position = this.position || defaultPosition;
22448
22476
  }
22477
+ onMouseEnter() {
22478
+ this.tooltipMouseService.onMouseEnterContent();
22479
+ }
22480
+ onMouseLeave() {
22481
+ this.tooltipMouseService.onMouseLeaveContent();
22482
+ }
22449
22483
  updateCssClass({ oldClass, newClass }) {
22450
22484
  this.renderer.removeClass(this.el.nativeElement, oldClass);
22451
22485
  this.renderer.addClass(this.el.nativeElement, newClass);
22452
22486
  }
22453
22487
  }
22454
- 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 });
22455
- 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 });
22488
+ 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 });
22489
+ 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 });
22456
22490
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltipContent, decorators: [{
22457
22491
  type: Component,
22458
22492
  args: [{
@@ -22471,7 +22505,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22471
22505
  }, {
22472
22506
  type: Inject,
22473
22507
  args: [POPOVER_HOST_ANCHOR]
22474
- }] }, { type: TooltipIdService }];
22508
+ }] }, { type: TooltipIdService }, { type: TooltipMouseService }];
22475
22509
  }, propDecorators: { id: [{
22476
22510
  type: Input
22477
22511
  }], position: [{
@@ -22480,6 +22514,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22480
22514
  }], size: [{
22481
22515
  type: Input,
22482
22516
  args: ['clrSize']
22517
+ }], onMouseEnter: [{
22518
+ type: HostListener,
22519
+ args: ['mouseenter']
22520
+ }], onMouseLeave: [{
22521
+ type: HostListener,
22522
+ args: ['mouseleave']
22483
22523
  }] } });
22484
22524
 
22485
22525
  /*
@@ -22488,25 +22528,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22488
22528
  * The full license information can be found in LICENSE in the root directory of this project.
22489
22529
  */
22490
22530
  class ClrTooltipTrigger {
22491
- constructor(toggleService, tooltipIdService) {
22531
+ constructor(toggleService, tooltipIdService, tooltipMouseService) {
22492
22532
  this.toggleService = toggleService;
22493
22533
  this.tooltipIdService = tooltipIdService;
22534
+ this.tooltipMouseService = tooltipMouseService;
22494
22535
  this.subs = [];
22495
22536
  // The aria-described by comes from the id of content. It
22496
22537
  this.subs.push(this.tooltipIdService.id.subscribe(tooltipId => (this.ariaDescribedBy = tooltipId)));
22497
22538
  }
22539
+ ngOnDestroy() {
22540
+ this.subs.forEach(sub => sub.unsubscribe());
22541
+ }
22498
22542
  showTooltip() {
22499
22543
  this.toggleService.open = true;
22500
22544
  }
22501
22545
  hideTooltip() {
22502
22546
  this.toggleService.open = false;
22503
22547
  }
22504
- ngOnDestroy() {
22505
- this.subs.forEach(sub => sub.unsubscribe());
22548
+ onMouseEnter() {
22549
+ this.tooltipMouseService.onMouseEnterTrigger();
22550
+ }
22551
+ onMouseLeave() {
22552
+ this.tooltipMouseService.onMouseLeaveTrigger();
22506
22553
  }
22507
22554
  }
22508
- 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 });
22509
- 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 });
22555
+ 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 });
22556
+ 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 });
22510
22557
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTooltipTrigger, decorators: [{
22511
22558
  type: Directive,
22512
22559
  args: [{
@@ -22518,18 +22565,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
22518
22565
  '[attr.role]': '"button"',
22519
22566
  },
22520
22567
  }]
22521
- }], ctorParameters: function () { return [{ type: ClrPopoverToggleService }, { type: TooltipIdService }]; }, propDecorators: { showTooltip: [{
22522
- type: HostListener,
22523
- args: ['mouseenter']
22524
- }, {
22568
+ }], ctorParameters: function () { return [{ type: ClrPopoverToggleService }, { type: TooltipIdService }, { type: TooltipMouseService }]; }, propDecorators: { showTooltip: [{
22525
22569
  type: HostListener,
22526
22570
  args: ['focus']
22527
22571
  }], hideTooltip: [{
22528
- type: HostListener,
22529
- args: ['mouseleave']
22530
- }, {
22531
22572
  type: HostListener,
22532
22573
  args: ['blur']
22574
+ }], onMouseEnter: [{
22575
+ type: HostListener,
22576
+ args: ['mouseenter']
22577
+ }], onMouseLeave: [{
22578
+ type: HostListener,
22579
+ args: ['mouseleave']
22533
22580
  }] } });
22534
22581
 
22535
22582
  /*