@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.
@@ -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 get properties() {
6
- return {
7
- /**
8
- * @ignore
9
- */
10
- ariaExpanded: { type: String, reflect: true, attribute: 'aria-expanded' },
11
- /**
12
- * @ignore
13
- */
14
- ariaHaspopup: { type: String, reflect: true, attribute: 'aria-haspopup' },
15
- /**
16
- * @ignore
17
- */
18
- ariaLabel: { type: String, reflect: true, attribute: 'aria-label' },
19
- /**
20
- * @ignore
21
- */
22
- // eslint-disable-next-line lit/no-native-attributes
23
- autofocus: { type: Boolean, reflect: true },
24
- /**
25
- * Wether the controlled element is expanded. Replaces 'aria-expanded'
26
- * @type {'true' | 'false'}
27
- */
28
- expanded: { type: String, reflect: true, attribute: 'expanded' },
29
- /**
30
- * Disables the button
31
- * @type {boolean}
32
- */
33
- disabled: { type: Boolean, reflect: true },
34
- /**
35
- * Tooltip text when disabled
36
- * @type {string}
37
- */
38
- disabledTooltip: { type: String, attribute: 'disabled-tooltip' },
39
- /**
40
- * @ignore
41
- */
42
- form: { type: String, reflect: true },
43
- /**
44
- * @ignore
45
- */
46
- formaction: { type: String, reflect: true },
47
- /**
48
- * @ignore
49
- */
50
- formenctype: { type: String, reflect: true },
51
- /**
52
- * @ignore
53
- */
54
- formmethod: { type: String, reflect: true },
55
- /**
56
- * @ignore
57
- */
58
- formnovalidate: { type: String, reflect: true },
59
- /**
60
- * @ignore
61
- */
62
- formtarget: { type: String, reflect: true },
63
- /**
64
- * @ignore
65
- */
66
- name: { type: String, reflect: true },
67
- /**
68
- * @ignore
69
- */
70
- type: { type: String, reflect: true }
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.days.long[index]}">
485
- ${calendarData.descriptor.calendar.days.short[index]}
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 get properties() {
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 clear language to indicate there is no data available
36
- * Offer concise guidance about next steps
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
- * Replace the entire content with its empty state; do not show an empty table or list header
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
- * Don't leave a section completely empty, or use a skeleton loading screen in place of an empty state component
44
- * Avoid causing users to believe that they have hit a dead-end when they have not
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 get properties() {
9
- return {
10
- /**
11
- * Disables bulk actions in the list or table controls once the selection limit is reached, but does not prevent further selection
12
- * @type {number}
13
- */
14
- maxSelectionCount: { type: Number, attribute: 'max-selection-count' },
15
- /**
16
- * Whether the action requires one or more selected items
17
- * @type {boolean}
18
- */
19
- requiresSelection: { type: Boolean, attribute: 'requires-selection', reflect: true },
20
- _disabledTooltip: { state: true }
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();