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