@brightspace-ui/core 2.86.5 → 2.86.6

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.
@@ -94,7 +94,7 @@ class ScrollWrapper extends FocusVisiblePolyfillMixin(RtlMixin(LitElement)) {
94
94
  .d2l-scroll-wrapper-actions {
95
95
  position: -webkit-sticky;
96
96
  position: sticky;
97
- top: 0;
97
+ top: var(--d2l-table-sticky-top, 0);
98
98
  z-index: 4;
99
99
  }
100
100
 
@@ -140,11 +140,11 @@ export const tableStyles = css`
140
140
  /* first column that's sticky: offset by size of border-radius so top/bottom border doesn't show through (default style only) */
141
141
  d2l-table-wrapper[sticky-headers][type="default"]:not([dir="rtl"]) .d2l-table > * > tr > .d2l-table-sticky-cell.d2l-table-cell-first,
142
142
  d2l-table-wrapper[sticky-headers][type="default"]:not([dir="rtl"]) .d2l-table > * > tr > [sticky].d2l-table-cell-first {
143
- left: var(--d2l-table-border-radius-sticky-offset);
143
+ left: var(--d2l-table-border-radius-sticky-offset, 0);
144
144
  }
145
145
  d2l-table-wrapper[sticky-headers][type="default"][dir="rtl"] .d2l-table > * > tr > .d2l-table-sticky-cell.d2l-table-cell-first,
146
146
  d2l-table-wrapper[sticky-headers][type="default"][dir="rtl"] .d2l-table > * > tr > [sticky].d2l-table-cell-first {
147
- right: var(--d2l-table-border-radius-sticky-offset);
147
+ right: var(--d2l-table-border-radius-sticky-offset, 0);
148
148
  }
149
149
 
150
150
  /* non-header sticky cells */
@@ -233,7 +233,7 @@ export class TableWrapper extends RtlMixin(SelectionMixin(LitElement)) {
233
233
  }
234
234
  .d2l-sticky-headers-backdrop {
235
235
  position: sticky;
236
- top: calc(var(--d2l-table-sticky-top) + var(--d2l-table-border-radius));
236
+ top: calc(var(--d2l-table-sticky-top, 0px) + var(--d2l-table-border-radius));
237
237
  width: 100%;
238
238
  z-index: 2; /* Must sit under d2l-table sticky-headers but over sticky columns and regular cells */
239
239
  }
@@ -418,15 +418,15 @@ export class TableWrapper extends RtlMixin(SelectionMixin(LitElement)) {
418
418
  }
419
419
 
420
420
  _updateStickyTops() {
421
- if (!this._table || !this.stickyHeaders) return;
422
-
423
421
  const hasStickyControls = this._controls && !this._controls.noSticky;
424
422
  let rowTop = hasStickyControls ? this._controls.offsetHeight + 6 : 0; // +6 for the internal `margin-bottom`.
425
423
  this.style.setProperty('--d2l-table-sticky-top', `${rowTop}px`);
426
424
 
425
+ if (!this._table || !this.stickyHeaders) return;
426
+
427
427
  const stickyRows = Array.from(this._table.querySelectorAll('tr.d2l-table-header, tr[header], thead tr'));
428
428
  stickyRows.forEach(r => {
429
- const thTop = hasStickyControls ? `${rowTop}px` : `calc(${rowTop}px + var(--d2l-table-border-radius-sticky-offset))`;
429
+ const thTop = hasStickyControls ? `${rowTop}px` : `calc(${rowTop}px + var(--d2l-table-border-radius-sticky-offset, 0px))`;
430
430
  const ths = Array.from(r.querySelectorAll('th'));
431
431
  ths.forEach(th => th.style.top = thTop);
432
432
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.86.5",
3
+ "version": "2.86.6",
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",