@brightspace-ui/core 2.33.0 → 2.33.1

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.
@@ -1,6 +1,4 @@
1
- import { FocusVisiblePolyfillMixin } from '../../mixins/focus-visible-polyfill-mixin.js';
2
-
3
- export const MenuItemMixin = superclass => class extends FocusVisiblePolyfillMixin(superclass) {
1
+ export const MenuItemMixin = superclass => class extends superclass {
4
2
 
5
3
  static get properties() {
6
4
  return {
@@ -16,8 +16,6 @@ export const menuItemStyles = css`
16
16
  width: 100%;
17
17
  }
18
18
 
19
- :host(.focus-visible),
20
- :host([first].focus-visible),
21
19
  :host(:hover),
22
20
  :host([first]:hover) {
23
21
  background-color: var(--d2l-menu-background-color-hover);
@@ -27,7 +25,23 @@ export const menuItemStyles = css`
27
25
  z-index: 2;
28
26
  }
29
27
 
30
- :host([disabled]), :host([disabled]:hover), :host([disabled].focus-visible) {
28
+ /** separated because Safari <15.4 is having trouble parsing these */
29
+ :host(:focus-visible),
30
+ :host([first]:focus-visible) {
31
+ background-color: var(--d2l-menu-background-color-hover);
32
+ border-bottom: 1px solid var(--d2l-menu-border-color-hover);
33
+ border-top: 1px solid var(--d2l-menu-border-color-hover);
34
+ color: var(--d2l-menu-foreground-color-hover);
35
+ z-index: 2;
36
+ }
37
+
38
+ :host([disabled]), :host([disabled]:hover) {
39
+ cursor: default;
40
+ opacity: 0.75;
41
+ }
42
+
43
+ /** separated because Safari <15.4 is having trouble parsing these */
44
+ :host([disabled]:focus-visible) {
31
45
  cursor: default;
32
46
  opacity: 0.75;
33
47
  }
@@ -40,7 +54,12 @@ export const menuItemStyles = css`
40
54
  border-top-color: transparent;
41
55
  }
42
56
 
43
- :host([last]:hover), :host([last].focus-visible) {
57
+ :host([last]:hover) {
58
+ border-bottom-color: var(--d2l-menu-border-color-hover);
59
+ }
60
+
61
+ /** separated because Safari <15.4 is having trouble parsing these */
62
+ :host([last]:focus-visible) {
44
63
  border-bottom-color: var(--d2l-menu-border-color-hover);
45
64
  }
46
65
 
@@ -2,7 +2,6 @@ import '../colors/colors.js';
2
2
  import '../icons/icon.js';
3
3
  import './menu-item-return.js';
4
4
  import { css, html, LitElement } from 'lit';
5
- import { FocusVisiblePolyfillMixin } from '../../mixins/focus-visible-polyfill-mixin.js';
6
5
  import { HierarchicalViewMixin } from '../hierarchical-view/hierarchical-view-mixin.js';
7
6
  import { ThemeMixin } from '../../mixins/theme-mixin.js';
8
7
 
@@ -21,7 +20,7 @@ const keyCodes = {
21
20
  * @slot - Menu items
22
21
  * @fires d2l-menu-resize - Dispatched when size of menu changes (e.g., when nested menu of a different size is opened)
23
22
  */
24
- class Menu extends FocusVisiblePolyfillMixin(ThemeMixin(HierarchicalViewMixin(LitElement))) {
23
+ class Menu extends ThemeMixin(HierarchicalViewMixin(LitElement)) {
25
24
 
26
25
  static get properties() {
27
26
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.33.0",
3
+ "version": "2.33.1",
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",