@brightspace-ui/core 3.134.1 → 3.134.2
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,8 @@
|
|
1
|
+
import { PropertyRequiredMixin } from '../../mixins/property-required/property-required-mixin.js';
|
2
|
+
|
1
3
|
const defaultLines = 2;
|
2
4
|
|
3
|
-
export const MenuItemMixin = superclass => class extends superclass {
|
5
|
+
export const MenuItemMixin = superclass => class extends PropertyRequiredMixin(superclass) {
|
4
6
|
|
5
7
|
static get properties() {
|
6
8
|
return {
|
@@ -45,7 +47,7 @@ export const MenuItemMixin = superclass => class extends superclass {
|
|
45
47
|
* REQUIRED: Text displayed by the menu item
|
46
48
|
* @type {string}
|
47
49
|
*/
|
48
|
-
text: { type: String },
|
50
|
+
text: { type: String, required: true },
|
49
51
|
/**
|
50
52
|
* ACCESSIBILITY: A description of the menu item that will be used by screen readers for additional context
|
51
53
|
* @type {string}
|
package/components/menu/menu.js
CHANGED
@@ -3,6 +3,7 @@ import '../icons/icon.js';
|
|
3
3
|
import './menu-item-return.js';
|
4
4
|
import { css, html, LitElement } from 'lit';
|
5
5
|
import { HierarchicalViewMixin } from '../hierarchical-view/hierarchical-view-mixin.js';
|
6
|
+
import { PropertyRequiredMixin } from '../../mixins/property-required/property-required-mixin.js';
|
6
7
|
import { ThemeMixin } from '../../mixins/theme/theme-mixin.js';
|
7
8
|
|
8
9
|
const keyCodes = {
|
@@ -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 PropertyRequiredMixin(ThemeMixin(HierarchicalViewMixin(LitElement))) {
|
24
25
|
|
25
26
|
static get properties() {
|
26
27
|
return {
|
@@ -32,7 +33,7 @@ class Menu extends ThemeMixin(HierarchicalViewMixin(LitElement)) {
|
|
32
33
|
* ACCESSIBILITY: Acts as the primary label for the menu (REQUIRED for root menu)
|
33
34
|
* @type {string}
|
34
35
|
*/
|
35
|
-
label: { type: String },
|
36
|
+
label: { type: String, required: true },
|
36
37
|
/**
|
37
38
|
* @ignore
|
38
39
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.134.
|
3
|
+
"version": "3.134.2",
|
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",
|