@brightspace-ui/core 3.237.4 → 3.237.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.
|
@@ -23,13 +23,13 @@ export const _generateLinkStyles = (selector, includeSkeleton = true) => {
|
|
|
23
23
|
return css`
|
|
24
24
|
${selectorCSS}, ${selectorCSS}:visited, ${selectorCSS}:active, ${selectorCSS}:link {
|
|
25
25
|
--d2l-focus-ring-offset: 1px;
|
|
26
|
-
color: var(--d2l-color-
|
|
26
|
+
color: var(--d2l-theme-text-color-interactive-default);
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
outline-style: none;
|
|
29
29
|
text-decoration: none;
|
|
30
30
|
}
|
|
31
31
|
${selectorCSS}:hover {
|
|
32
|
-
color: var(--d2l-color-
|
|
32
|
+
color: var(--d2l-theme-text-color-interactive-hover);
|
|
33
33
|
text-decoration: underline;
|
|
34
34
|
}
|
|
35
35
|
${getFocusRingStyles(selector, { extraStyles: css`border-radius: 2px; text-decoration: underline;` })}
|
|
@@ -43,7 +43,7 @@ export const _generateLinkStyles = (selector, includeSkeleton = true) => {
|
|
|
43
43
|
}
|
|
44
44
|
@media print {
|
|
45
45
|
${selectorCSS}, ${selectorCSS}:visited, ${selectorCSS}:active, ${selectorCSS}:link {
|
|
46
|
-
color: var(--d2l-color-
|
|
46
|
+
color: var(--d2l-theme-text-color-static-standard);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
${skeletonStyles}
|
package/components/link/link.js
CHANGED
|
@@ -105,7 +105,7 @@ class Link extends LocalizeCoreElement(FocusMixin(LitElement)) {
|
|
|
105
105
|
white-space: nowrap;
|
|
106
106
|
}
|
|
107
107
|
d2l-icon {
|
|
108
|
-
color: var(--d2l-color-
|
|
108
|
+
color: var(--d2l-theme-text-color-interactive-default);
|
|
109
109
|
height: calc(1em - 1px);
|
|
110
110
|
margin-inline-start: 0.315em;
|
|
111
111
|
transform: translateY(0.1em);
|
|
@@ -114,25 +114,25 @@ class Link extends LocalizeCoreElement(FocusMixin(LitElement)) {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
a:hover d2l-icon {
|
|
117
|
-
--d2l-icon-fill-color: var(--d2l-color-
|
|
117
|
+
--d2l-icon-fill-color: var(--d2l-theme-text-color-interactive-hover);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
:host([disabled]:not([disabled-tooltip])) a:hover {
|
|
121
|
-
color: var(--d2l-color-
|
|
121
|
+
color: var(--d2l-theme-text-color-interactive-default);
|
|
122
122
|
text-decoration: none;
|
|
123
123
|
}
|
|
124
124
|
:host([disabled]:not([disabled-tooltip])) a:hover d2l-icon {
|
|
125
|
-
--d2l-icon-fill-color: var(--d2l-color-
|
|
125
|
+
--d2l-icon-fill-color: var(--d2l-theme-text-color-interactive-default);
|
|
126
126
|
}
|
|
127
127
|
a[aria-disabled="true"],
|
|
128
128
|
a[aria-disabled="true"]:active {
|
|
129
129
|
cursor: default;
|
|
130
130
|
}
|
|
131
131
|
a[aria-disabled="true"] .d2l-link-content {
|
|
132
|
-
opacity:
|
|
132
|
+
opacity: var(--d2l-theme-opacity-disabled-link);
|
|
133
133
|
}
|
|
134
134
|
a[aria-disabled="true"] d2l-icon {
|
|
135
|
-
opacity:
|
|
135
|
+
opacity: var(--d2l-theme-opacity-disabled-linkicon);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
@media print {
|
|
@@ -10,6 +10,8 @@ import { isPopoverSupported } from '../popover/popover-mixin.js';
|
|
|
10
10
|
import { PageableMixin } from '../paging/pageable-mixin.js';
|
|
11
11
|
import { SelectionMixin } from '../selection/selection-mixin.js';
|
|
12
12
|
|
|
13
|
+
const enableStickyScrollyFix = getFlag('table-sticky-scrolly-fix', true);
|
|
14
|
+
|
|
13
15
|
export const tableStyles = css`
|
|
14
16
|
.d2l-table {
|
|
15
17
|
border-collapse: separate; /* needed to override reset stylesheets */
|
|
@@ -447,6 +449,10 @@ export class TableWrapper extends PageableMixin(SelectionMixin(LitElement)) {
|
|
|
447
449
|
}
|
|
448
450
|
}
|
|
449
451
|
|
|
452
|
+
#hasIntersected = false;
|
|
453
|
+
|
|
454
|
+
#noScrollWidthTimeout = null;
|
|
455
|
+
|
|
450
456
|
_applyClassNames() {
|
|
451
457
|
if (!this._table) return;
|
|
452
458
|
|
|
@@ -581,6 +587,7 @@ export class TableWrapper extends PageableMixin(SelectionMixin(LitElement)) {
|
|
|
581
587
|
this._tableIntersectionObserver = new IntersectionObserver((entries) => {
|
|
582
588
|
entries.forEach((entry) => {
|
|
583
589
|
if (entry.isIntersecting) {
|
|
590
|
+
this.#hasIntersected = true;
|
|
584
591
|
this._handleTableChange();
|
|
585
592
|
}
|
|
586
593
|
});
|
|
@@ -647,11 +654,20 @@ export class TableWrapper extends PageableMixin(SelectionMixin(LitElement)) {
|
|
|
647
654
|
const head = this._table.querySelector('thead');
|
|
648
655
|
const body = this._table.querySelector('tbody');
|
|
649
656
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
this
|
|
653
|
-
|
|
654
|
-
|
|
657
|
+
if (enableStickyScrollyFix) {
|
|
658
|
+
clearTimeout(this.#noScrollWidthTimeout);
|
|
659
|
+
this.#noScrollWidthTimeout = setTimeout(() => {
|
|
660
|
+
const maxScrollWidth = Math.max(head?.scrollWidth, body?.scrollWidth);
|
|
661
|
+
this._noScrollWidth = (maxScrollWidth <= this.clientWidth);
|
|
662
|
+
});
|
|
663
|
+
if (!head || !body || !this.stickyHeaders || !this.stickyHeadersScrollWrapper || this._noScrollWidth || !this.#hasIntersected) return;
|
|
664
|
+
} else {
|
|
665
|
+
const maxScrollWidth = Math.max(head?.scrollWidth, body?.scrollWidth);
|
|
666
|
+
setTimeout(() => {
|
|
667
|
+
this._noScrollWidth = this.clientWidth === maxScrollWidth;
|
|
668
|
+
});
|
|
669
|
+
if (!head || !body || !this._table || !this.stickyHeaders || !this.stickyHeadersScrollWrapper || this._noScrollWidth) return;
|
|
670
|
+
}
|
|
655
671
|
|
|
656
672
|
const candidateRowHeadCells = [];
|
|
657
673
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.237.
|
|
3
|
+
"version": "3.237.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",
|