@brightspace-ui/core 3.274.0 → 3.274.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.
- package/components/button/button-mixin.js +66 -68
- package/components/calendar/calendar.js +2 -2
- package/components/demo/demo-passthrough-mixin.js +1 -3
- package/components/empty-state/README.md +10 -6
- package/components/selection/selection-action-mixin.js +13 -15
- package/custom-elements.json +10701 -1997
- package/package.json +2 -2
|
@@ -2,74 +2,72 @@ import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
|
|
|
2
2
|
|
|
3
3
|
export const ButtonMixin = superclass => class extends FocusMixin(superclass) {
|
|
4
4
|
|
|
5
|
-
static
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
}
|
|
5
|
+
static properties = {
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
ariaExpanded: { type: String, reflect: true, attribute: 'aria-expanded' },
|
|
10
|
+
/**
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
ariaHaspopup: { type: String, reflect: true, attribute: 'aria-haspopup' },
|
|
14
|
+
/**
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
ariaLabel: { type: String, reflect: true, attribute: 'aria-label' },
|
|
18
|
+
/**
|
|
19
|
+
* @ignore
|
|
20
|
+
*/
|
|
21
|
+
// eslint-disable-next-line lit/no-native-attributes
|
|
22
|
+
autofocus: { type: Boolean, reflect: true },
|
|
23
|
+
/**
|
|
24
|
+
* Wether the controlled element is expanded. Replaces 'aria-expanded'
|
|
25
|
+
* @type {'true' | 'false'}
|
|
26
|
+
*/
|
|
27
|
+
expanded: { type: String, reflect: true, attribute: 'expanded' },
|
|
28
|
+
/**
|
|
29
|
+
* Disables the button
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
*/
|
|
32
|
+
disabled: { type: Boolean, reflect: true },
|
|
33
|
+
/**
|
|
34
|
+
* Tooltip text when disabled
|
|
35
|
+
* @type {string}
|
|
36
|
+
*/
|
|
37
|
+
disabledTooltip: { type: String, attribute: 'disabled-tooltip' },
|
|
38
|
+
/**
|
|
39
|
+
* @ignore
|
|
40
|
+
*/
|
|
41
|
+
form: { type: String, reflect: true },
|
|
42
|
+
/**
|
|
43
|
+
* @ignore
|
|
44
|
+
*/
|
|
45
|
+
formaction: { type: String, reflect: true },
|
|
46
|
+
/**
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
formenctype: { type: String, reflect: true },
|
|
50
|
+
/**
|
|
51
|
+
* @ignore
|
|
52
|
+
*/
|
|
53
|
+
formmethod: { type: String, reflect: true },
|
|
54
|
+
/**
|
|
55
|
+
* @ignore
|
|
56
|
+
*/
|
|
57
|
+
formnovalidate: { type: String, reflect: true },
|
|
58
|
+
/**
|
|
59
|
+
* @ignore
|
|
60
|
+
*/
|
|
61
|
+
formtarget: { type: String, reflect: true },
|
|
62
|
+
/**
|
|
63
|
+
* @ignore
|
|
64
|
+
*/
|
|
65
|
+
name: { type: String, reflect: true },
|
|
66
|
+
/**
|
|
67
|
+
* @ignore
|
|
68
|
+
*/
|
|
69
|
+
type: { type: String, reflect: true }
|
|
70
|
+
};
|
|
73
71
|
|
|
74
72
|
constructor() {
|
|
75
73
|
super();
|
|
@@ -481,8 +481,8 @@ class Calendar extends LocalizeCoreElement(LitElement) {
|
|
|
481
481
|
|
|
482
482
|
const weekdayHeaders = calendarData.daysOfWeekIndex.map((index) => html`
|
|
483
483
|
<th>
|
|
484
|
-
<abbr class="d2l-body-small" title="${calendarData.descriptor.calendar.
|
|
485
|
-
${calendarData.descriptor.calendar.
|
|
484
|
+
<abbr class="d2l-body-small" title="${calendarData.descriptor.calendar.daysStandAlone.wide[index]}">
|
|
485
|
+
${calendarData.descriptor.calendar.daysStandAlone.abbreviated[index]}
|
|
486
486
|
</abbr>
|
|
487
487
|
</th>
|
|
488
488
|
`);
|
|
@@ -8,9 +8,7 @@ import { LitElement } from 'lit';
|
|
|
8
8
|
* @param { String } target The element name or other selector string of the element to pass properties to.
|
|
9
9
|
*/
|
|
10
10
|
export const DemoPassthroughMixin = (superclass, target) => class extends LitElement {
|
|
11
|
-
static
|
|
12
|
-
return Object.fromEntries(superclass.elementProperties);
|
|
13
|
-
}
|
|
11
|
+
static properties = Object.fromEntries(superclass.elementProperties);
|
|
14
12
|
|
|
15
13
|
firstUpdated() {
|
|
16
14
|
this.target = this.shadowRoot.querySelector(target);
|
|
@@ -32,16 +32,20 @@ Empty state components are used to convey that there is no data available to be
|
|
|
32
32
|
|
|
33
33
|
<!-- docs: start best practices -->
|
|
34
34
|
<!-- docs: start dos -->
|
|
35
|
-
* Use
|
|
36
|
-
*
|
|
35
|
+
* Use an empty state in place of an empty list, table, widget, or page section
|
|
36
|
+
* Replace the entire content with its empty state; do not show an empty table or list header
|
|
37
37
|
* Include an [Empty State Action](#d2l-empty-state-action-button) or [Link](#d2l-empty-state-action-link) if it can help the user
|
|
38
|
-
*
|
|
38
|
+
* Follow our [Writing guidelines]({{ project.assetPath }}/style-elements/writing/#periods)
|
|
39
|
+
* Use clear language to indicate there is no data available
|
|
40
|
+
* Offer concise guidance about next steps unless the action or button already provides a next step
|
|
41
|
+
* If you include an action or button, end your message with a period even if it's a single sentence (this is an exception to the rules for [Periods]({{ project.assetPath }}/style-elements/writing/#periods))
|
|
39
42
|
<!-- docs: end dos -->
|
|
40
43
|
|
|
41
44
|
<!-- docs: start donts -->
|
|
42
|
-
* Don’t use an empty state as a default state while data is loading
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
+
* Don’t use an empty state as a default state while data is loading — consider using a [Skeleton Loader or Loading Spinner]({{ project.assetPath }}/components/loading-spinner/#when-should-i-use-the-skeleton-loader-pattern-vs.-a-loading-spinner) instead
|
|
46
|
+
* Avoid having multiple empty state messages caused by the same root issue
|
|
47
|
+
* The presence of multiple empty states often indicates a special case that can be addressed at the design level
|
|
48
|
+
* For instance, an underlying error causing no data to be returned or a first-time user who could be guided through creating the data instead of seeing a bunch of empty states
|
|
45
49
|
<!-- docs: end donts -->
|
|
46
50
|
<!-- docs: end best practices -->
|
|
47
51
|
|
|
@@ -5,21 +5,19 @@ import { SelectionObserverMixin } from './selection-observer-mixin.js';
|
|
|
5
5
|
|
|
6
6
|
export const SelectionActionMixin = superclass => class extends LocalizeCoreElement(SelectionObserverMixin(superclass)) {
|
|
7
7
|
|
|
8
|
-
static
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
}
|
|
8
|
+
static properties = {
|
|
9
|
+
/**
|
|
10
|
+
* Disables bulk actions in the list or table controls once the selection limit is reached, but does not prevent further selection
|
|
11
|
+
* @type {number}
|
|
12
|
+
*/
|
|
13
|
+
maxSelectionCount: { type: Number, attribute: 'max-selection-count' },
|
|
14
|
+
/**
|
|
15
|
+
* Whether the action requires one or more selected items
|
|
16
|
+
* @type {boolean}
|
|
17
|
+
*/
|
|
18
|
+
requiresSelection: { type: Boolean, attribute: 'requires-selection', reflect: true },
|
|
19
|
+
_disabledTooltip: { state: true }
|
|
20
|
+
};
|
|
23
21
|
|
|
24
22
|
constructor() {
|
|
25
23
|
super();
|