@brightspace-ui/core 3.279.1 → 3.280.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.
@@ -34,6 +34,10 @@ class BackdropLoading extends PropertyRequiredMixin(FreshnessMixin(LocalizeCoreE
34
34
  };
35
35
 
36
36
  static styles = [css`
37
+
38
+ :host {
39
+ position: absolute;
40
+ }
37
41
  .backdrop-container {
38
42
  display: none;
39
43
  }
@@ -158,7 +162,7 @@ class BackdropLoading extends PropertyRequiredMixin(FreshnessMixin(LocalizeCoreE
158
162
  willUpdate(changedProperties) {
159
163
  super.willUpdate(changedProperties);
160
164
 
161
- if (changedProperties.has('freshness') && changedProperties.get('freshness') !== undefined) {
165
+ if (changedProperties.has('freshness')) {
162
166
  this.#clearLiveRegionContent();
163
167
 
164
168
  const oldState = changedProperties.get('freshness');
@@ -170,9 +174,9 @@ class BackdropLoading extends PropertyRequiredMixin(FreshnessMixin(LocalizeCoreE
170
174
  this.#setLiveRegionContent(this.localize('components.backdrop-loading.loadingCompleteAnnouncement'));
171
175
  }
172
176
 
173
- if (oldState === freshness.fresh) {
177
+ if (oldState === freshness.fresh || (oldState === undefined && this.freshness !== freshness.fresh)) {
174
178
  this.#show();
175
- } else if (newState === freshness.fresh) {
179
+ } else if (oldState !== undefined && newState === freshness.fresh) {
176
180
  this.#fade();
177
181
  } else if (oldState === freshness.loading && newState === freshness.stale) {
178
182
  setTimeout(() => {
@@ -1,4 +1,6 @@
1
+ import '../backdrop/backdrop-loading.js';
1
2
  import { css, html, LitElement } from 'lit';
3
+ import { freshness, FreshnessMixin } from '../../mixins/freshness/freshness-mixin.js';
2
4
  import { getNextFocusable, getPreviousFocusable } from '../../helpers/focus.js';
3
5
  import { SelectionInfo, SelectionMixin } from '../selection/selection-mixin.js';
4
6
  import { ifDefined } from 'lit/directives/if-defined.js';
@@ -10,6 +12,7 @@ const keyCodes = {
10
12
  };
11
13
 
12
14
  export const listSelectionStates = SelectionInfo.states;
15
+ export const listFreshness = freshness;
13
16
 
14
17
  export const listLayouts = Object.freeze({
15
18
  list: 'list',
@@ -33,7 +36,7 @@ const ro = new ResizeObserver(entries => {
33
36
  * @slot pager - Slot for `d2l-pager-load-more` to be rendered below the list
34
37
  * @fires d2l-list-items-move - Dispatched when one or more items are moved. See [Event Details: d2l-list-items-move](#event-details%3A-%40d2l-list-items-move).
35
38
  */
36
- class List extends PageableMixin(SelectionMixin(LitElement)) {
39
+ class List extends FreshnessMixin(PageableMixin(SelectionMixin(LitElement))) {
37
40
 
38
41
  static properties = {
39
42
  /**
@@ -111,13 +114,13 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
111
114
  --d2l-list-item-illustration-max-width: 4.5rem;
112
115
  display: block;
113
116
  }
114
- :host([layout="tiles"]) > .d2l-list-content {
117
+ :host([layout="tiles"]) > div > .d2l-list-content {
115
118
  display: flex;
116
119
  flex-wrap: wrap;
117
120
  gap: 0.9rem;
118
121
  justify-content: normal;
119
122
  }
120
- :host(:not([slot="nested"])) > .d2l-list-content {
123
+ :host(:not([slot="nested"])) > div > .d2l-list-content {
121
124
  padding-bottom: 1px;
122
125
  }
123
126
  :host([hidden]) {
@@ -150,6 +153,17 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
150
153
  margin-bottom: calc(6px + 0.4rem); /* controls section margin-bottom + spacing for add-button */
151
154
  }
152
155
 
156
+ .backdrop-loading-container {
157
+ position: relative;
158
+ }
159
+ d2l-backdrop-loading {
160
+ margin: -12px; /* must match outside-control-container */
161
+ }
162
+ :host([extend-separators]) d2l-backdrop-loading,
163
+ :host([layout="tiles"]) d2l-backdrop-loading {
164
+ margin: 0; /* must match outside-control-container */
165
+ }
166
+
153
167
  ::slotted(.d2l-list-tile-break) {
154
168
  display: none;
155
169
  }
@@ -246,12 +260,22 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
246
260
  return html`
247
261
  <slot name="controls"></slot>
248
262
  <slot name="header"></slot>
249
- <div role="${role}" aria-label="${ifDefined(ariaLabel)}" class="d2l-list-content">
250
- <slot @keydown="${this._handleKeyDown}" @slotchange="${this._handleSlotChange}"></slot>
263
+ <div class="backdrop-loading-container">
264
+ <div id="list-content" role="${role}" aria-label="${ifDefined(ariaLabel)}" class="d2l-list-content">
265
+ <slot @keydown="${this._handleKeyDown}" @slotchange="${this._handleSlotChange}"></slot>
266
+ </div>
267
+ <d2l-backdrop-loading
268
+ @d2l-backdrop-stale-overlay-action="${this._handleBackdropStaleOverlayAction}"
269
+ for="list-content"
270
+ freshness="${this.freshness}"
271
+ freshness-stale-button-text="${this.freshnessStaleButtonText}"
272
+ freshness-stale-text="${this.freshnessStaleText}">
273
+ </d2l-backdrop-loading>
274
+ ${this._renderPagerContainer()}
251
275
  </div>
252
- ${this._renderPagerContainer()}
253
276
  `;
254
277
  }
278
+
255
279
  willUpdate(changedProperties) {
256
280
  super.willUpdate(changedProperties);
257
281
  if (changedProperties.has('breakpoints') && changedProperties.get('breakpoints') !== undefined) {
@@ -377,6 +401,11 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
377
401
  return items.length > 0 ? items[0]._getFlattenedListItems().lazyLoadListItems : new Map();
378
402
  }
379
403
 
404
+ _handleBackdropStaleOverlayAction() {
405
+ /** Dispatched when the action button on the stale overlay is clicked */
406
+ this.dispatchEvent(new CustomEvent('d2l-list-stale-button-click'));
407
+ }
408
+
380
409
  _handleKeyDown(e) {
381
410
  if (!this.grid || this.slot === 'nested' || e.keyCode !== keyCodes.TAB) return;
382
411
  e.preventDefault();
@@ -215,6 +215,9 @@ class Page extends ProviderMixin(LocalizeCoreElement(LitElement)) {
215
215
  .supporting-panel.animate .supporting-panel-content {
216
216
  transition: width 400ms cubic-bezier(0, 0.7, 0.5, 1);
217
217
  }
218
+ .divider.animate {
219
+ transition: margin 400ms cubic-bezier(0, 0.7, 0.5, 1);
220
+ }
218
221
  .side-nav-panel.animate.collapsed,
219
222
  .supporting-panel.animate.collapsed {
220
223
  transition: width 400ms cubic-bezier(0, 0.7, 0.5, 1), visibility 0s 400ms;
@@ -376,9 +379,13 @@ class Page extends ProviderMixin(LocalizeCoreElement(LitElement)) {
376
379
  }
377
380
 
378
381
  #renderDivider(panelKey, label, panelPosition) {
382
+ const classes = {
383
+ 'divider': true,
384
+ 'animate': this._panelState.getAnimate(panelKey)
385
+ };
379
386
  return html`
380
387
  <d2l-page-divider-internal
381
- class="divider"
388
+ class="${classMap(classes)}"
382
389
  data-panel-key="${panelKey}"
383
390
  label="${label}"
384
391
  ?collapsed="${this._panelState.getCollapsed(panelKey)}"
@@ -1,5 +1,6 @@
1
1
  import { getFirstFocusableDescendant, getLastFocusableDescendant, getNextFocusable, getPreviousFocusable } from '../../helpers/focus.js';
2
2
  import { CollectionMixin } from '../../mixins/collection/collection-mixin.js';
3
+ import { freshness } from '../../mixins/freshness/freshness-mixin.js';
3
4
  import { isComposedAncestor } from '../../helpers/dom.js';
4
5
 
5
6
  const keyCodes = {
@@ -95,6 +96,14 @@ export const SelectionMixin = superclass => class extends CollectionMixin(superc
95
96
  this.removeEventListener('d2l-selection-input-subscribe', this._handleSelectionInputSubscribe);
96
97
  }
97
98
 
99
+ willUpdate(changedProperties) {
100
+ super.willUpdate(changedProperties);
101
+
102
+ if (changedProperties.has('freshness')) {
103
+ this._updateSelectionObservers();
104
+ }
105
+ }
106
+
98
107
  getSelectionInfo() {
99
108
  let allEnabledSelected = true;
100
109
  let state = (this._selectionSelectables.size > 0 ? SelectionInfo.states.none : SelectionInfo.states.notSet);
@@ -254,7 +263,10 @@ export const SelectionMixin = superclass => class extends CollectionMixin(superc
254
263
  this._updateObserversRequested = true;
255
264
  setTimeout(() => {
256
265
  const info = this.getSelectionInfo(true);
257
- this._selectionObservers.forEach(observer => observer.selectionInfo = info);
266
+ this._selectionObservers.forEach(observer => {
267
+ observer.selectionInfo = info;
268
+ observer.selectionDisabled = (this.freshness === freshness.stale || this.freshness === freshness.loading);
269
+ });
258
270
  this._updateObserversRequested = false;
259
271
  }, 0);
260
272
  }
@@ -4,6 +4,12 @@ import { SelectionInfo } from './selection-mixin.js';
4
4
  export const SelectionObserverMixin = superclass => class extends superclass {
5
5
 
6
6
  static properties = {
7
+ /**
8
+ * Whether selection is disabled (set by the selection component)
9
+ * @ignore
10
+ * @type {boolean}
11
+ */
12
+ selectionDisabled: { type: Boolean, reflect: true, attribute: 'selection-disabled' },
7
13
  /**
8
14
  * Id of the `SelectionMixin` component this component wants to observe (if not located within that component)
9
15
  * @type {string}
@@ -20,6 +26,7 @@ export const SelectionObserverMixin = superclass => class extends superclass {
20
26
 
21
27
  constructor() {
22
28
  super();
29
+ this.selectionDisabled = false;
23
30
  this.selectionInfo = new SelectionInfo();
24
31
  this._provider = null;
25
32
  }
@@ -34,6 +34,7 @@ class SelectAllPages extends FocusMixin(LocalizeCoreElement(SelectionObserverMix
34
34
  return html`
35
35
  <d2l-button-subtle
36
36
  @click="${this._handleClick}"
37
+ ?disabled="${this.selectionDisabled}"
37
38
  text="${this.localize('components.selection.select-all-items', { count: this._provider.itemCount, countFormatted: formatNumber(this._provider.itemCount) })}">
38
39
  </d2l-button-subtle>`;
39
40
  }
@@ -51,7 +51,7 @@ class SelectAll extends FocusMixin(LocalizeCoreElement(SelectionObserverMixin(Li
51
51
  label-hidden
52
52
  @change="${this.#handleCheckboxChange}"
53
53
  ?checked="${this.#getIsChecked()}"
54
- ?disabled="${this.disabled}"
54
+ ?disabled="${this.disabled || this.selectionDisabled }"
55
55
  description="${ifDefined(this.selectionInfo.state !== SelectionInfo.states.none ? summary : undefined)}"
56
56
  ?indeterminate="${this.#getIsIndeterminate()}">
57
57
  </d2l-input-checkbox>
@@ -9997,6 +9997,11 @@
9997
9997
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
9998
9998
  "type": "string"
9999
9999
  },
10000
+ {
10001
+ "name": "selectionDisabled",
10002
+ "type": "boolean",
10003
+ "default": "false"
10004
+ },
10000
10005
  {
10001
10006
  "name": "selectionInfo"
10002
10007
  }
@@ -11383,6 +11388,22 @@
11383
11388
  "type": "'list'|'tiles'",
11384
11389
  "default": "\"\\\"list\\\"\""
11385
11390
  },
11391
+ {
11392
+ "name": "freshness-stale-button-text",
11393
+ "description": "The button text in the overlay when 'stale'",
11394
+ "type": "string"
11395
+ },
11396
+ {
11397
+ "name": "freshness-stale-text",
11398
+ "description": "The text message in the overlay when 'stale'",
11399
+ "type": "string"
11400
+ },
11401
+ {
11402
+ "name": "freshness",
11403
+ "description": "The freshness of the component data",
11404
+ "type": "'fresh'|'stale'|'loading'",
11405
+ "default": "\"\\\"fresh\\\"\""
11406
+ },
11386
11407
  {
11387
11408
  "name": "item-count",
11388
11409
  "description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
@@ -11435,7 +11456,7 @@
11435
11456
  },
11436
11457
  {
11437
11458
  "name": "styles",
11438
- "default": "\"css`\\n\\t\\t:host {\\n\\t\\t\\t--d2l-list-item-color-border-radius: 6px;\\n\\t\\t\\t--d2l-list-item-color-width: 6px;\\n\\t\\t\\t--d2l-list-item-illustration-margin-inline-end: 0.9rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-height: 2.6rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-width: 4.5rem;\\n\\t\\t\\tdisplay: block;\\n\\t\\t}\\n\\t\\t:host([layout=\\\"tiles\\\"]) > .d2l-list-content {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-wrap: wrap;\\n\\t\\t\\tgap: 0.9rem;\\n\\t\\t\\tjustify-content: normal;\\n\\t\\t}\\n\\t\\t:host(:not([slot=\\\"nested\\\"])) > .d2l-list-content {\\n\\t\\t\\tpadding-bottom: 1px;\\n\\t\\t}\\n\\t\\t:host([hidden]) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\tslot[name=\\\"pager\\\"]::slotted(*) {\\n\\t\\t\\tmargin-top: 10px;\\n\\t\\t}\\n\\t\\t:host([extend-separators]) slot[name=\\\"pager\\\"]::slotted(*) {\\n\\t\\t\\tmargin-left: 0.9rem;\\n\\t\\t\\tmargin-right: 0.9rem;\\n\\t\\t}\\n\\t\\t:host([_breakpoint=\\\"1\\\"]) {\\n\\t\\t\\t--d2l-list-item-illustration-max-height: 3.55rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-width: 6rem;\\n\\t\\t}\\n\\t\\t:host([_breakpoint=\\\"2\\\"]) {\\n\\t\\t\\t--d2l-list-item-illustration-max-height: 5.1rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-width: 9rem;\\n\\t\\t}\\n\\t\\t:host([_breakpoint=\\\"3\\\"]) {\\n\\t\\t\\t--d2l-list-item-illustration-max-height: 6rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-width: 10.8rem;\\n\\t\\t}\\n\\t\\t:host([_slim-color]) {\\n\\t\\t\\t--d2l-list-item-color-border-radius: 3px;\\n\\t\\t\\t--d2l-list-item-color-width: 3px;\\n\\t\\t}\\n\\t\\t:host([add-button]) ::slotted([slot=\\\"controls\\\"]) {\\n\\t\\t\\tmargin-bottom: calc(6px + 0.4rem); /* controls section margin-bottom + spacing for add-button */\\n\\t\\t}\\n\\n\\t\\t::slotted(.d2l-list-tile-break) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\t:host([layout=\\\"tiles\\\"]) ::slotted(.d2l-list-tile-break) {\\n\\t\\t\\tdisplay: block;\\n\\t\\t\\tflex-basis: 100%;\\n\\t\\t\\theight: 0;\\n\\t\\t}\\n\\t`\""
11459
+ "default": "\"css`\\n\\t\\t:host {\\n\\t\\t\\t--d2l-list-item-color-border-radius: 6px;\\n\\t\\t\\t--d2l-list-item-color-width: 6px;\\n\\t\\t\\t--d2l-list-item-illustration-margin-inline-end: 0.9rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-height: 2.6rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-width: 4.5rem;\\n\\t\\t\\tdisplay: block;\\n\\t\\t}\\n\\t\\t:host([layout=\\\"tiles\\\"]) > div > .d2l-list-content {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-wrap: wrap;\\n\\t\\t\\tgap: 0.9rem;\\n\\t\\t\\tjustify-content: normal;\\n\\t\\t}\\n\\t\\t:host(:not([slot=\\\"nested\\\"])) > div > .d2l-list-content {\\n\\t\\t\\tpadding-bottom: 1px;\\n\\t\\t}\\n\\t\\t:host([hidden]) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\tslot[name=\\\"pager\\\"]::slotted(*) {\\n\\t\\t\\tmargin-top: 10px;\\n\\t\\t}\\n\\t\\t:host([extend-separators]) slot[name=\\\"pager\\\"]::slotted(*) {\\n\\t\\t\\tmargin-left: 0.9rem;\\n\\t\\t\\tmargin-right: 0.9rem;\\n\\t\\t}\\n\\t\\t:host([_breakpoint=\\\"1\\\"]) {\\n\\t\\t\\t--d2l-list-item-illustration-max-height: 3.55rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-width: 6rem;\\n\\t\\t}\\n\\t\\t:host([_breakpoint=\\\"2\\\"]) {\\n\\t\\t\\t--d2l-list-item-illustration-max-height: 5.1rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-width: 9rem;\\n\\t\\t}\\n\\t\\t:host([_breakpoint=\\\"3\\\"]) {\\n\\t\\t\\t--d2l-list-item-illustration-max-height: 6rem;\\n\\t\\t\\t--d2l-list-item-illustration-max-width: 10.8rem;\\n\\t\\t}\\n\\t\\t:host([_slim-color]) {\\n\\t\\t\\t--d2l-list-item-color-border-radius: 3px;\\n\\t\\t\\t--d2l-list-item-color-width: 3px;\\n\\t\\t}\\n\\t\\t:host([add-button]) ::slotted([slot=\\\"controls\\\"]) {\\n\\t\\t\\tmargin-bottom: calc(6px + 0.4rem); /* controls section margin-bottom + spacing for add-button */\\n\\t\\t}\\n\\n\\t\\t.backdrop-loading-container {\\n\\t\\t\\tposition: relative;\\n\\t\\t}\\n\\t\\td2l-backdrop-loading {\\n\\t\\t\\tmargin: -12px; /* must match outside-control-container */\\n\\t\\t}\\n\\t\\t:host([extend-separators]) d2l-backdrop-loading,\\n\\t\\t:host([layout=\\\"tiles\\\"]) d2l-backdrop-loading {\\n\\t\\t\\tmargin: 0; /* must match outside-control-container */\\n\\t\\t}\\n\\n\\t\\t::slotted(.d2l-list-tile-break) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\t:host([layout=\\\"tiles\\\"]) ::slotted(.d2l-list-tile-break) {\\n\\t\\t\\tdisplay: block;\\n\\t\\t\\tflex-basis: 100%;\\n\\t\\t\\theight: 0;\\n\\t\\t}\\n\\t`\""
11439
11460
  },
11440
11461
  {
11441
11462
  "name": "addButton",
@@ -11479,6 +11500,25 @@
11479
11500
  "type": "'list'|'tiles'",
11480
11501
  "default": "\"\\\"list\\\"\""
11481
11502
  },
11503
+ {
11504
+ "name": "freshnessStaleButtonText",
11505
+ "attribute": "freshness-stale-button-text",
11506
+ "description": "The button text in the overlay when 'stale'",
11507
+ "type": "string"
11508
+ },
11509
+ {
11510
+ "name": "freshnessStaleText",
11511
+ "attribute": "freshness-stale-text",
11512
+ "description": "The text message in the overlay when 'stale'",
11513
+ "type": "string"
11514
+ },
11515
+ {
11516
+ "name": "freshness",
11517
+ "attribute": "freshness",
11518
+ "description": "The freshness of the component data",
11519
+ "type": "'fresh'|'stale'|'loading'",
11520
+ "default": "\"\\\"fresh\\\"\""
11521
+ },
11482
11522
  {
11483
11523
  "name": "itemCount",
11484
11524
  "attribute": "item-count",
@@ -11511,6 +11551,10 @@
11511
11551
  "name": "d2l-list-selection-change",
11512
11552
  "description": "Dispatched when the selection state changes"
11513
11553
  },
11554
+ {
11555
+ "name": "d2l-list-stale-button-click",
11556
+ "description": "Dispatched when the action button on the stale overlay is clicked"
11557
+ },
11514
11558
  {
11515
11559
  "name": "d2l-list-add-button-click",
11516
11560
  "description": "Dispatched when the add button directly before or after the item is clicked. Event detail includes position ('before' or 'after') and key.\nThe `key` belongs to the list item adjacent to where the new item should be positioned.\nThe `position` represents where the new item should be positioned relative to the item with that key."
@@ -13540,7 +13584,7 @@
13540
13584
  "properties": [
13541
13585
  {
13542
13586
  "name": "styles",
13543
- "default": "\"css`\\n\\t\\t:host {\\n\\t\\t\\t--d2l-page-header-max-width: 1230px;\\n\\t\\t\\t--d2l-page-content-max-width: 1230px;\\n\\t\\t\\t--d2l-page-footer-max-width: 1230px;\\n\\t\\t\\t--d2l-page-margin-inline: auto;\\n\\t\\t\\t--d2l-page-padding: 30px;\\n\\t\\t}\\n\\n\\t\\t:host([width-type=\\\"wide\\\"]) {\\n\\t\\t\\t--d2l-page-header-max-width: 1440px;\\n\\t\\t\\t--d2l-page-content-max-width: 1440px;\\n\\t\\t\\t--d2l-page-footer-max-width: 1440px;\\n\\t\\t}\\n\\n\\t\\t:host([width-type=\\\"fullscreen\\\"]) {\\n\\t\\t\\t--d2l-page-header-max-width: 100%;\\n\\t\\t\\t--d2l-page-content-max-width: 100%;\\n\\t\\t\\t--d2l-page-footer-max-width: 100%;\\n\\t\\t}\\n\\n\\t\\t@media (max-width: 929px) {\\n\\t\\t\\t:host {\\n\\t\\t\\t\\t--d2l-page-padding: 24px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t@media (max-width: 767px) {\\n\\t\\t\\t:host {\\n\\t\\t\\t\\t--d2l-page-padding: 18px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t.header {\\n\\t\\t\\tposition: relative;\\n\\t\\t\\tz-index: 16; /* To be over sticky content of our core components and the divider */\\n\\t\\t}\\n\\n\\t\\t.page.header-sticky .header {\\n\\t\\t\\tposition: sticky;\\n\\t\\t\\ttop: 0;\\n\\t\\t}\\n\\n\\t\\t.content {\\n\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tmargin-inline: var(--d2l-page-margin-inline, 0);\\n\\t\\t\\tmax-width: var(--d2l-page-content-max-width, 100%);\\n\\t\\t\\tpadding-bottom: var(--d2l-page-footer-height, 0); /* Reserve space for fixed footer */\\n\\t\\t}\\n\\t\\t.content.has-panels {\\n\\t\\t\\tmin-height: calc(100vh - var(--d2l-page-header-height-measured, 0px));\\n\\t\\t}\\n\\n\\t\\tmain {\\n\\t\\t\\tflex: 1;\\n\\t\\t\\tmin-width: min(${MAIN_MIN_WIDTH}px, 100%);\\n\\t\\t}\\n\\n\\t\\t.side-nav,\\n\\t\\t.supporting {\\n\\t\\t\\tdisplay: contents;\\n\\t\\t}\\n\\n\\t\\t.side-nav-panel,\\n\\t\\t.supporting-panel {\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\n\\t\\t.side-nav-panel,\\n\\t\\t.supporting-panel,\\n\\t\\t.divider {\\n\\t\\t\\tposition: sticky;\\n\\t\\t\\ttop: var(--d2l-page-header-height, 0);\\n\\t\\t}\\n\\n\\t\\t.side-nav-panel,\\n\\t\\t.supporting-panel,\\n\\t\\t.side-nav-panel-content,\\n\\t\\t.supporting-panel-content,\\n\\t\\t.divider {\\n\\t\\t\\tmax-height: calc(100vh - var(--d2l-page-header-height, 0) - var(--d2l-page-footer-height, 0));\\n\\t\\t}\\n\\n\\t\\t.side-nav-panel-content,\\n\\t\\t.supporting-panel-content {\\n\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\toverflow: clip auto;\\n\\t\\t}\\n\\t\\t.side-nav-panel-content {\\n\\t\\t\\tfloat: inline-end;\\n\\t\\t}\\n\\t\\t.supporting-panel-content {\\n\\t\\t\\tfloat: inline-start;\\n\\t\\t}\\n\\n\\t\\t.divider {\\n\\t\\t\\tz-index: 15; /* To be over d2l-page-* panel headers */\\n\\t\\t}\\n\\n\\t\\t.side-nav .divider[collapsed] {\\n\\t\\t\\tmargin-inline-start: 18px;\\n\\t\\t}\\n\\t\\t.supporting .divider[collapsed] {\\n\\t\\t\\tmargin-inline-end: 18px;\\n\\t\\t}\\n\\t\\t.side-nav-panel.collapsed,\\n\\t\\t.supporting-panel.collapsed {\\n\\t\\t\\tvisibility: hidden;\\n\\t\\t}\\n\\t\\t@media (prefers-reduced-motion: no-preference) {\\n\\t\\t\\t.side-nav-panel.animate,\\n\\t\\t\\t.supporting-panel.animate,\\n\\t\\t\\t.side-nav-panel.animate .side-nav-panel-content,\\n\\t\\t\\t.supporting-panel.animate .supporting-panel-content {\\n\\t\\t\\t\\ttransition: width 400ms cubic-bezier(0, 0.7, 0.5, 1);\\n\\t\\t\\t}\\n\\t\\t\\t.side-nav-panel.animate.collapsed,\\n\\t\\t\\t.supporting-panel.animate.collapsed {\\n\\t\\t\\t\\ttransition: width 400ms cubic-bezier(0, 0.7, 0.5, 1), visibility 0s 400ms;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t.footer:not([hidden]),\\n\\t\\t.floating-buttons-container {\\n\\t\\t\\tdisplay: inline;\\n\\t\\t}\\n\\t\\t.fixed-footer {\\n\\t\\t\\tbackground-color: white;\\n\\t\\t\\tbox-shadow: 0 -2px 4px rgba(32, 33, 34, 0.2); /* ferrite */\\n\\t\\t\\tinset: auto 0 0;\\n\\t\\t\\tpadding-block-start: 0.75rem;\\n\\t\\t\\tposition: fixed;\\n\\t\\t\\tz-index: 15; /* To be over sticky content of our core components and divider */\\n\\t\\t}\\n\\t\\t.footer-contents {\\n\\t\\t\\tmargin-inline: var(--d2l-page-margin-inline, 0);\\n\\t\\t\\tmax-width: var(--d2l-page-footer-max-width, 100%);\\n\\t\\t}\\n\\t`\""
13587
+ "default": "\"css`\\n\\t\\t:host {\\n\\t\\t\\t--d2l-page-header-max-width: 1230px;\\n\\t\\t\\t--d2l-page-content-max-width: 1230px;\\n\\t\\t\\t--d2l-page-footer-max-width: 1230px;\\n\\t\\t\\t--d2l-page-margin-inline: auto;\\n\\t\\t\\t--d2l-page-padding: 30px;\\n\\t\\t}\\n\\n\\t\\t:host([width-type=\\\"wide\\\"]) {\\n\\t\\t\\t--d2l-page-header-max-width: 1440px;\\n\\t\\t\\t--d2l-page-content-max-width: 1440px;\\n\\t\\t\\t--d2l-page-footer-max-width: 1440px;\\n\\t\\t}\\n\\n\\t\\t:host([width-type=\\\"fullscreen\\\"]) {\\n\\t\\t\\t--d2l-page-header-max-width: 100%;\\n\\t\\t\\t--d2l-page-content-max-width: 100%;\\n\\t\\t\\t--d2l-page-footer-max-width: 100%;\\n\\t\\t}\\n\\n\\t\\t@media (max-width: 929px) {\\n\\t\\t\\t:host {\\n\\t\\t\\t\\t--d2l-page-padding: 24px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t@media (max-width: 767px) {\\n\\t\\t\\t:host {\\n\\t\\t\\t\\t--d2l-page-padding: 18px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t.header {\\n\\t\\t\\tposition: relative;\\n\\t\\t\\tz-index: 16; /* To be over sticky content of our core components and the divider */\\n\\t\\t}\\n\\n\\t\\t.page.header-sticky .header {\\n\\t\\t\\tposition: sticky;\\n\\t\\t\\ttop: 0;\\n\\t\\t}\\n\\n\\t\\t.content {\\n\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tmargin-inline: var(--d2l-page-margin-inline, 0);\\n\\t\\t\\tmax-width: var(--d2l-page-content-max-width, 100%);\\n\\t\\t\\tpadding-bottom: var(--d2l-page-footer-height, 0); /* Reserve space for fixed footer */\\n\\t\\t}\\n\\t\\t.content.has-panels {\\n\\t\\t\\tmin-height: calc(100vh - var(--d2l-page-header-height-measured, 0px));\\n\\t\\t}\\n\\n\\t\\tmain {\\n\\t\\t\\tflex: 1;\\n\\t\\t\\tmin-width: min(${MAIN_MIN_WIDTH}px, 100%);\\n\\t\\t}\\n\\n\\t\\t.side-nav,\\n\\t\\t.supporting {\\n\\t\\t\\tdisplay: contents;\\n\\t\\t}\\n\\n\\t\\t.side-nav-panel,\\n\\t\\t.supporting-panel {\\n\\t\\t\\toverflow: hidden;\\n\\t\\t}\\n\\n\\t\\t.side-nav-panel,\\n\\t\\t.supporting-panel,\\n\\t\\t.divider {\\n\\t\\t\\tposition: sticky;\\n\\t\\t\\ttop: var(--d2l-page-header-height, 0);\\n\\t\\t}\\n\\n\\t\\t.side-nav-panel,\\n\\t\\t.supporting-panel,\\n\\t\\t.side-nav-panel-content,\\n\\t\\t.supporting-panel-content,\\n\\t\\t.divider {\\n\\t\\t\\tmax-height: calc(100vh - var(--d2l-page-header-height, 0) - var(--d2l-page-footer-height, 0));\\n\\t\\t}\\n\\n\\t\\t.side-nav-panel-content,\\n\\t\\t.supporting-panel-content {\\n\\t\\t\\tbox-sizing: border-box;\\n\\t\\t\\toverflow: clip auto;\\n\\t\\t}\\n\\t\\t.side-nav-panel-content {\\n\\t\\t\\tfloat: inline-end;\\n\\t\\t}\\n\\t\\t.supporting-panel-content {\\n\\t\\t\\tfloat: inline-start;\\n\\t\\t}\\n\\n\\t\\t.divider {\\n\\t\\t\\tz-index: 15; /* To be over d2l-page-* panel headers */\\n\\t\\t}\\n\\n\\t\\t.side-nav .divider[collapsed] {\\n\\t\\t\\tmargin-inline-start: 18px;\\n\\t\\t}\\n\\t\\t.supporting .divider[collapsed] {\\n\\t\\t\\tmargin-inline-end: 18px;\\n\\t\\t}\\n\\t\\t.side-nav-panel.collapsed,\\n\\t\\t.supporting-panel.collapsed {\\n\\t\\t\\tvisibility: hidden;\\n\\t\\t}\\n\\t\\t@media (prefers-reduced-motion: no-preference) {\\n\\t\\t\\t.side-nav-panel.animate,\\n\\t\\t\\t.supporting-panel.animate,\\n\\t\\t\\t.side-nav-panel.animate .side-nav-panel-content,\\n\\t\\t\\t.supporting-panel.animate .supporting-panel-content {\\n\\t\\t\\t\\ttransition: width 400ms cubic-bezier(0, 0.7, 0.5, 1);\\n\\t\\t\\t}\\n\\t\\t\\t.divider.animate {\\n\\t\\t\\t\\ttransition: margin 400ms cubic-bezier(0, 0.7, 0.5, 1);\\n\\t\\t\\t}\\n\\t\\t\\t.side-nav-panel.animate.collapsed,\\n\\t\\t\\t.supporting-panel.animate.collapsed {\\n\\t\\t\\t\\ttransition: width 400ms cubic-bezier(0, 0.7, 0.5, 1), visibility 0s 400ms;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t.footer:not([hidden]),\\n\\t\\t.floating-buttons-container {\\n\\t\\t\\tdisplay: inline;\\n\\t\\t}\\n\\t\\t.fixed-footer {\\n\\t\\t\\tbackground-color: white;\\n\\t\\t\\tbox-shadow: 0 -2px 4px rgba(32, 33, 34, 0.2); /* ferrite */\\n\\t\\t\\tinset: auto 0 0;\\n\\t\\t\\tpadding-block-start: 0.75rem;\\n\\t\\t\\tposition: fixed;\\n\\t\\t\\tz-index: 15; /* To be over sticky content of our core components and divider */\\n\\t\\t}\\n\\t\\t.footer-contents {\\n\\t\\t\\tmargin-inline: var(--d2l-page-margin-inline, 0);\\n\\t\\t\\tmax-width: var(--d2l-page-footer-max-width, 100%);\\n\\t\\t}\\n\\t`\""
13544
13588
  },
13545
13589
  {
13546
13590
  "name": "widthType",
@@ -14209,6 +14253,11 @@
14209
14253
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
14210
14254
  "type": "string"
14211
14255
  },
14256
+ {
14257
+ "name": "selectionDisabled",
14258
+ "type": "boolean",
14259
+ "default": "false"
14260
+ },
14212
14261
  {
14213
14262
  "name": "selectionInfo"
14214
14263
  },
@@ -14332,6 +14381,11 @@
14332
14381
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
14333
14382
  "type": "string"
14334
14383
  },
14384
+ {
14385
+ "name": "selectionDisabled",
14386
+ "type": "boolean",
14387
+ "default": "false"
14388
+ },
14335
14389
  {
14336
14390
  "name": "selectionInfo"
14337
14391
  },
@@ -14473,6 +14527,11 @@
14473
14527
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
14474
14528
  "type": "string"
14475
14529
  },
14530
+ {
14531
+ "name": "selectionDisabled",
14532
+ "type": "boolean",
14533
+ "default": "false"
14534
+ },
14476
14535
  {
14477
14536
  "name": "selectionInfo"
14478
14537
  },
@@ -14594,6 +14653,11 @@
14594
14653
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
14595
14654
  "type": "string"
14596
14655
  },
14656
+ {
14657
+ "name": "selectionDisabled",
14658
+ "type": "boolean",
14659
+ "default": "false"
14660
+ },
14597
14661
  {
14598
14662
  "name": "selectionInfo"
14599
14663
  }
@@ -14744,6 +14808,11 @@
14744
14808
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
14745
14809
  "type": "string"
14746
14810
  },
14811
+ {
14812
+ "name": "selectionDisabled",
14813
+ "type": "boolean",
14814
+ "default": "false"
14815
+ },
14747
14816
  {
14748
14817
  "name": "selectionInfo"
14749
14818
  }
@@ -14790,6 +14859,11 @@
14790
14859
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
14791
14860
  "type": "string"
14792
14861
  },
14862
+ {
14863
+ "name": "selectionDisabled",
14864
+ "type": "boolean",
14865
+ "default": "false"
14866
+ },
14793
14867
  {
14794
14868
  "name": "selectionInfo"
14795
14869
  }
@@ -14835,6 +14909,11 @@
14835
14909
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
14836
14910
  "type": "string"
14837
14911
  },
14912
+ {
14913
+ "name": "selectionDisabled",
14914
+ "type": "boolean",
14915
+ "default": "false"
14916
+ },
14838
14917
  {
14839
14918
  "name": "selectionInfo"
14840
14919
  }
@@ -14850,6 +14929,22 @@
14850
14929
  "name": "d2l-test-selection",
14851
14930
  "path": "./components/selection/test/selection-component.js",
14852
14931
  "attributes": [
14932
+ {
14933
+ "name": "freshness-stale-button-text",
14934
+ "description": "The button text in the overlay when 'stale'",
14935
+ "type": "string"
14936
+ },
14937
+ {
14938
+ "name": "freshness-stale-text",
14939
+ "description": "The text message in the overlay when 'stale'",
14940
+ "type": "string"
14941
+ },
14942
+ {
14943
+ "name": "freshness",
14944
+ "description": "The freshness of the component data",
14945
+ "type": "'fresh'|'stale'|'loading'",
14946
+ "default": "\"\\\"fresh\\\"\""
14947
+ },
14853
14948
  {
14854
14949
  "name": "selection-single",
14855
14950
  "description": "Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.",
@@ -14858,6 +14953,25 @@
14858
14953
  }
14859
14954
  ],
14860
14955
  "properties": [
14956
+ {
14957
+ "name": "freshnessStaleButtonText",
14958
+ "attribute": "freshness-stale-button-text",
14959
+ "description": "The button text in the overlay when 'stale'",
14960
+ "type": "string"
14961
+ },
14962
+ {
14963
+ "name": "freshnessStaleText",
14964
+ "attribute": "freshness-stale-text",
14965
+ "description": "The text message in the overlay when 'stale'",
14966
+ "type": "string"
14967
+ },
14968
+ {
14969
+ "name": "freshness",
14970
+ "attribute": "freshness",
14971
+ "description": "The freshness of the component data",
14972
+ "type": "'fresh'|'stale'|'loading'",
14973
+ "default": "\"\\\"fresh\\\"\""
14974
+ },
14861
14975
  {
14862
14976
  "name": "selectionNoInputArrowKeyBehaviour",
14863
14977
  "type": "boolean",
@@ -14893,6 +15007,11 @@
14893
15007
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
14894
15008
  "type": "string"
14895
15009
  },
15010
+ {
15011
+ "name": "selectionDisabled",
15012
+ "type": "boolean",
15013
+ "default": "false"
15014
+ },
14896
15015
  {
14897
15016
  "name": "selectionInfo"
14898
15017
  }
@@ -14920,6 +15039,11 @@
14920
15039
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
14921
15040
  "type": "string"
14922
15041
  },
15042
+ {
15043
+ "name": "selectionDisabled",
15044
+ "type": "boolean",
15045
+ "default": "false"
15046
+ },
14923
15047
  {
14924
15048
  "name": "selectionInfo"
14925
15049
  }
@@ -16167,6 +16291,11 @@
16167
16291
  "description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
16168
16292
  "type": "string"
16169
16293
  },
16294
+ {
16295
+ "name": "selectionDisabled",
16296
+ "type": "boolean",
16297
+ "default": "false"
16298
+ },
16170
16299
  {
16171
16300
  "name": "selectionInfo"
16172
16301
  }
package/helpers/dom.js CHANGED
@@ -84,7 +84,7 @@ export function getComposedChildren(node, predicate = () => true) {
84
84
  if (!node) {
85
85
  return null;
86
86
  }
87
- if (node.nodeType !== 1 && node.nodeType !== 9 && node.nodeType !== 11) {
87
+ if (node.nodeType !== Node.ELEMENT_NODE && node.nodeType !== Node.DOCUMENT_NODE && node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {
88
88
  return null;
89
89
  }
90
90
 
@@ -94,6 +94,7 @@ export function getComposedChildren(node, predicate = () => true) {
94
94
  if (node.tagName === 'CONTENT') {
95
95
  nodes = node.getDistributedNodes();
96
96
  } else if (node.tagName === 'SLOT') {
97
+ // note: this is not handling default slot content
97
98
  nodes = node.assignedNodes({ flatten: true });
98
99
  } else {
99
100
  if (node.shadowRoot) {
@@ -103,7 +104,7 @@ export function getComposedChildren(node, predicate = () => true) {
103
104
  }
104
105
 
105
106
  for (let i = 0; i < nodes.length; i++) {
106
- if (nodes[i].nodeType === 1) {
107
+ if (nodes[i].nodeType === Node.ELEMENT_NODE) {
107
108
  if (predicate(nodes[i])) {
108
109
  children.push(nodes[i]);
109
110
  }
@@ -243,7 +244,7 @@ export function getFirstVisibleAncestor(node) {
243
244
 
244
245
  export function querySelectorComposed(node, selector) {
245
246
 
246
- if (!node || (node.nodeType !== 1 && node.nodeType !== 9 && node.nodeType !== 11)) {
247
+ if (!node || (node.nodeType !== Node.ELEMENT_NODE && node.nodeType !== Node.DOCUMENT_NODE && node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE)) {
247
248
  throw new TypeError('Invalid node. Must be nodeType document, element or document fragment');
248
249
  }
249
250
  if (typeof selector !== 'string') {
package/helpers/focus.js CHANGED
@@ -210,7 +210,7 @@ export function getPreviousFocusableAncestor(node, includeHidden, includeTabbabl
210
210
 
211
211
  export function isFocusable(node, includeHidden, includeTabbablesOnly, includeDisabled) {
212
212
 
213
- if (!node || node.nodeType !== 1 || (!includeDisabled && node.disabled)) return false;
213
+ if (!node || node.nodeType !== Node.ELEMENT_NODE || (!includeDisabled && node.disabled)) return false;
214
214
 
215
215
  if (includeTabbablesOnly === undefined) includeTabbablesOnly = true;
216
216
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.279.1",
3
+ "version": "3.280.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",