@brightspace-ui/core 2.6.2 → 2.6.3

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.
@@ -74,7 +74,9 @@ export const ListItemMixin = superclass => class extends LocalizeCoreElement(Lis
74
74
  _dropdownOpen: { type: Boolean, attribute: '_dropdown-open', reflect: true },
75
75
  _fullscreenWithin: { type: Boolean, attribute: '_fullscreen-within', reflect: true },
76
76
  _hovering: { type: Boolean, reflect: true },
77
+ _hoveringPrimaryAction: { type: Boolean, attribute: '_hovering-primary-action', reflect: true },
77
78
  _focusing: { type: Boolean, reflect: true },
79
+ _focusingPrimaryAction: { type: Boolean, attribute: '_focusing-primary-action', reflect: true },
78
80
  _highlight: { type: Boolean, reflect: true },
79
81
  _highlighting: { type: Boolean, reflect: true },
80
82
  _tooltipShowing: { type: Boolean, attribute: '_tooltip-showing', reflect: true }
@@ -163,8 +165,8 @@ export const ListItemMixin = superclass => class extends LocalizeCoreElement(Lis
163
165
  .d2l-list-item-content ::slotted(*) {
164
166
  margin-top: 0.05rem;
165
167
  }
166
- :host([_hovering]) .d2l-list-item-content,
167
- :host([_focusing]) .d2l-list-item-content {
168
+ :host([_hovering-primary-action]) .d2l-list-item-content,
169
+ :host([_focusing-primary-action]) .d2l-list-item-content {
168
170
  --d2l-list-item-content-text-color: var(--d2l-color-celestine);
169
171
  --d2l-list-item-content-text-decoration: underline;
170
172
  }
@@ -511,11 +513,19 @@ export const ListItemMixin = superclass => class extends LocalizeCoreElement(Lis
511
513
  hasDisplayedKeyboardTooltip = true;
512
514
  }
513
515
 
516
+ _onFocusInPrimaryAction() {
517
+ this._focusingPrimaryAction = true;
518
+ }
519
+
514
520
  _onFocusOut() {
515
521
  this._focusing = false;
516
522
  this._displayKeyboardTooltip = false;
517
523
  }
518
524
 
525
+ _onFocusOutPrimaryAction() {
526
+ this._focusingPrimaryAction = false;
527
+ }
528
+
519
529
  _onFullscreenWithin(e) {
520
530
  if (e.detail.state) this._fullscreenWithinCount += 1;
521
531
  else this._fullscreenWithinCount -= 1;
@@ -527,6 +537,7 @@ export const ListItemMixin = superclass => class extends LocalizeCoreElement(Lis
527
537
  }
528
538
 
529
539
  _onMouseEnterPrimaryAction() {
540
+ this._hoveringPrimaryAction = true;
530
541
  this._hovering = true;
531
542
  }
532
543
 
@@ -535,6 +546,7 @@ export const ListItemMixin = superclass => class extends LocalizeCoreElement(Lis
535
546
  }
536
547
 
537
548
  _onMouseLeavePrimaryAction() {
549
+ this._hoveringPrimaryAction = false;
538
550
  this._hovering = false;
539
551
  }
540
552
 
@@ -572,6 +584,8 @@ export const ListItemMixin = superclass => class extends LocalizeCoreElement(Lis
572
584
  </div>` : nothing }
573
585
  ${primaryAction ? html`
574
586
  <div slot="content-action"
587
+ @focusin="${this._onFocusInPrimaryAction}"
588
+ @focusout="${this._onFocusOutPrimaryAction}"
575
589
  @mouseenter="${this._onMouseEnterPrimaryAction}"
576
590
  @mouseleave="${this._onMouseLeavePrimaryAction}">
577
591
  ${primaryAction}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",