@brightspace-ui/core 3.237.1 → 3.237.3
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.
|
@@ -3,10 +3,13 @@ import '../loading-spinner/loading-spinner.js';
|
|
|
3
3
|
import '../offscreen/offscreen.js';
|
|
4
4
|
import { css, html, LitElement, nothing } from 'lit';
|
|
5
5
|
import { getComposedChildren, getComposedParent } from '../../helpers/dom.js';
|
|
6
|
+
import { getFlag } from '../../helpers/flags.js';
|
|
6
7
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
7
8
|
import { PropertyRequiredMixin } from '../../mixins/property-required/property-required-mixin.js';
|
|
8
9
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
9
10
|
|
|
11
|
+
const OffSCREEN_SIZELESS = getFlag('d2l-offscreen-sizeless', true);
|
|
12
|
+
|
|
10
13
|
const BACKDROP_DELAY_MS = 800;
|
|
11
14
|
const FADE_DURATION_MS = 500;
|
|
12
15
|
const SPINNER_DELAY_MS = FADE_DURATION_MS;
|
|
@@ -101,6 +104,8 @@ class LoadingBackdrop extends PropertyRequiredMixin(LocalizeCoreElement(LitEleme
|
|
|
101
104
|
}
|
|
102
105
|
|
|
103
106
|
render() {
|
|
107
|
+
const forcedOffscreenSizelessStyles = OffSCREEN_SIZELESS ? {} : { height: '0px', width: '0px' };
|
|
108
|
+
|
|
104
109
|
return html`
|
|
105
110
|
${this._state === 'hidden' ? nothing :
|
|
106
111
|
html`<div id="visible">
|
|
@@ -108,7 +113,7 @@ class LoadingBackdrop extends PropertyRequiredMixin(LocalizeCoreElement(LitEleme
|
|
|
108
113
|
<d2l-loading-spinner style=${styleMap({ top: `${this._spinnerTop}px` })} size="${LOADING_SPINNER_SIZE}"></d2l-loading-spinner>
|
|
109
114
|
</div>`
|
|
110
115
|
}
|
|
111
|
-
<d2l-offscreen aria-live="polite">${this._ariaContent}</d2l-offscreen>
|
|
116
|
+
<d2l-offscreen style=${styleMap(forcedOffscreenSizelessStyles)} aria-live="polite">${this._ariaContent}</d2l-offscreen>
|
|
112
117
|
`;
|
|
113
118
|
}
|
|
114
119
|
updated(changedProperties) {
|
|
@@ -72,7 +72,7 @@ class DialogFullscreen extends PropertyRequiredMixin(LocalizeCoreElement(AsyncCo
|
|
|
72
72
|
@media (min-width: 616px) {
|
|
73
73
|
|
|
74
74
|
.d2l-dialog-header {
|
|
75
|
-
border-bottom: 1px solid var(--d2l-color-
|
|
75
|
+
border-bottom: 1px solid var(--d2l-theme-border-color-subtle);
|
|
76
76
|
padding-bottom: 0.9rem;
|
|
77
77
|
padding-top: 1rem;
|
|
78
78
|
}
|
|
@@ -147,7 +147,7 @@ class DialogFullscreen extends PropertyRequiredMixin(LocalizeCoreElement(AsyncCo
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
.d2l-dialog-footer {
|
|
150
|
-
border-top: 1px solid var(--d2l-color-
|
|
150
|
+
border-top: 1px solid var(--d2l-theme-border-color-subtle);
|
|
151
151
|
padding-bottom: 0; /* 0.9rem padding included on button */
|
|
152
152
|
padding-top: 0.9rem;
|
|
153
153
|
}
|
|
@@ -23,10 +23,10 @@ export const dialogStyles = css`
|
|
|
23
23
|
|
|
24
24
|
.d2l-dialog-outer {
|
|
25
25
|
animation: d2l-dialog-close 200ms ease-in;
|
|
26
|
-
background-color:
|
|
27
|
-
border: 1px solid var(--d2l-color-
|
|
26
|
+
background-color: var(--d2l-theme-background-color-base);
|
|
27
|
+
border: 1px solid var(--d2l-theme-border-color-standard);
|
|
28
28
|
border-radius: 8px;
|
|
29
|
-
box-shadow:
|
|
29
|
+
box-shadow: var(--d2l-theme-shadow-floating);
|
|
30
30
|
box-sizing: border-box;
|
|
31
31
|
position: fixed; /* also required for native to override position: absolute */
|
|
32
32
|
top: 75px;
|
|
@@ -53,7 +53,6 @@ export const dialogStyles = css`
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.d2l-dialog-outer.d2l-dialog-outer-nested-showing {
|
|
56
|
-
border-color: rgba(205, 213, 220, 0.35);
|
|
57
56
|
box-shadow: none;
|
|
58
57
|
}
|
|
59
58
|
|
|
@@ -66,21 +65,21 @@ export const dialogStyles = css`
|
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
dialog.d2l-dialog-outer {
|
|
69
|
-
color: var(--d2l-color-
|
|
68
|
+
color: var(--d2l-theme-text-color-static-standard);
|
|
70
69
|
margin-bottom: 0; /* required to override Chrome native positioning */
|
|
71
70
|
margin-top: 0; /* required to override Chrome native positioning */
|
|
72
71
|
padding: 0;
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
dialog::backdrop {
|
|
76
|
-
/*
|
|
77
|
-
background-color: #f9fbff;
|
|
75
|
+
/* fallback is for old browsers (see https://caniuse.com/mdn-css_selectors_backdrop_inherit_from_originating_element) */
|
|
76
|
+
background-color: var(--d2l-theme-backdrop-background-color, #f9fbff);
|
|
78
77
|
opacity: 0;
|
|
79
78
|
transition: opacity 200ms ease-in;
|
|
80
79
|
}
|
|
81
80
|
|
|
82
81
|
:host([_state="showing"]) dialog::backdrop {
|
|
83
|
-
opacity:
|
|
82
|
+
opacity: var(--d2l-theme-backdrop-opacity);
|
|
84
83
|
transition-timing-function: ease-out;
|
|
85
84
|
}
|
|
86
85
|
|
|
@@ -96,7 +95,7 @@ export const dialogStyles = css`
|
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
:host([critical]) .d2l-dialog-header {
|
|
99
|
-
border-block-start: 0.4rem solid var(--d2l-color-
|
|
98
|
+
border-block-start: 0.4rem solid var(--d2l-theme-status-color-error);
|
|
100
99
|
border-start-end-radius: 0.4rem;
|
|
101
100
|
border-start-start-radius: 0.4rem;
|
|
102
101
|
margin-block: -1px 0;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { css, html, LitElement } from 'lit';
|
|
2
|
+
import { getFlag } from '../../helpers/flags.js';
|
|
3
|
+
|
|
4
|
+
const OffSCREEN_SIZELESS = getFlag('d2l-offscreen-sizeless', true);
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
7
|
* A private helper declarations that should not be used by general consumers
|
|
5
8
|
*/
|
|
6
9
|
export const _offscreenStyleDeclarations = css`
|
|
7
10
|
direction: var(--d2l-document-direction, ${document.dir === 'rtl' ? css`rtl` : css`ltr`}); /* stylelint-disable-line @stylistic/string-quotes */
|
|
8
|
-
height:
|
|
11
|
+
height: ${OffSCREEN_SIZELESS ? 0 : 1}px;
|
|
9
12
|
inset-inline-start: -10000px;
|
|
10
13
|
overflow: hidden;
|
|
11
14
|
position: absolute !important;
|
|
12
15
|
white-space: nowrap;
|
|
13
|
-
width:
|
|
16
|
+
width: ${OffSCREEN_SIZELESS ? 0 : 1}px;
|
|
14
17
|
${document.dir === 'rtl' ? css`right` : css`left`}: -10000px;
|
|
15
18
|
`;
|
|
16
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.237.
|
|
3
|
+
"version": "3.237.3",
|
|
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",
|