@brightspace-ui/core 3.290.0 → 3.292.0
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.
- package/components/page/page.js +19 -4
- package/package.json +1 -1
package/components/page/page.js
CHANGED
|
@@ -14,7 +14,7 @@ const DRAWER_MIN_HEIGHT = 200; // TO DO: Confirm
|
|
|
14
14
|
export const MAIN_MIN_WIDTH = 600; // TO DO: Confirm
|
|
15
15
|
export const PANEL_MIN_WIDTH = 320;
|
|
16
16
|
|
|
17
|
-
const DIVIDER_GUTTER_WIDTH = 18;
|
|
17
|
+
export const DIVIDER_GUTTER_WIDTH = 18;
|
|
18
18
|
|
|
19
19
|
export const SIDE_NAV_DEFAULT_WIDTH = 334;
|
|
20
20
|
export const supportingDefaultWidth = contentWidth => Math.floor(contentWidth / 3);
|
|
@@ -463,7 +463,7 @@ class Page extends ProviderMixin(LocalizeCoreElement(LitElement)) {
|
|
|
463
463
|
${this.#renderSideNavPanel(sideNavPanelKey)}
|
|
464
464
|
<main aria-label="${ifDefined(showScrim ? this.localize(scrimMessage) : undefined)}">
|
|
465
465
|
<div class="main" ?inert="${showScrim}"><slot></slot></div>
|
|
466
|
-
${showScrim ? html`<div class="scrim"></div>` : nothing}
|
|
466
|
+
${showScrim ? html`<div class="scrim" @click="${this.#handleScrimClick}"></div>` : nothing}
|
|
467
467
|
</main>
|
|
468
468
|
${this.#renderSupportingPanel(supportingPanelKey)}
|
|
469
469
|
</div>
|
|
@@ -483,12 +483,22 @@ class Page extends ProviderMixin(LocalizeCoreElement(LitElement)) {
|
|
|
483
483
|
#stateStorageKey;
|
|
484
484
|
|
|
485
485
|
#handleMobileModeChange = (e) => {
|
|
486
|
-
// TO DO: Collapse supporting panel
|
|
486
|
+
// TO DO: Collapse supporting-overlay panel when moving from mobile to overlay mode
|
|
487
487
|
this._inMobileMode = e.matches;
|
|
488
488
|
};
|
|
489
489
|
|
|
490
490
|
#handleOverlayModeChange = (e) => {
|
|
491
|
-
|
|
491
|
+
if (!this._inOverlayMode && e.matches) {
|
|
492
|
+
this._panelState.setCollapsed('side-nav-overlay', true);
|
|
493
|
+
this._panelState.setCollapsed('supporting-overlay', true);
|
|
494
|
+
} else if (this._inOverlayMode && !e.matches) {
|
|
495
|
+
if (!this._panelState.getCollapsed('side-nav-overlay')) {
|
|
496
|
+
this._panelState.setCollapsed('side-nav', false);
|
|
497
|
+
}
|
|
498
|
+
if (!this._panelState.getCollapsed('supporting-overlay')) {
|
|
499
|
+
this._panelState.setCollapsed('supporting', false);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
492
502
|
this._inOverlayMode = e.matches;
|
|
493
503
|
};
|
|
494
504
|
|
|
@@ -535,6 +545,11 @@ class Page extends ProviderMixin(LocalizeCoreElement(LitElement)) {
|
|
|
535
545
|
this._panelState.setCollapsed(panelKey, collapsed);
|
|
536
546
|
};
|
|
537
547
|
|
|
548
|
+
#handleScrimClick() {
|
|
549
|
+
this._panelState.setCollapsed('side-nav-overlay', true);
|
|
550
|
+
this._panelState.setCollapsed('supporting-overlay', true);
|
|
551
|
+
}
|
|
552
|
+
|
|
538
553
|
#handleSlotVisibilityChange(e) {
|
|
539
554
|
const key = e.target.name;
|
|
540
555
|
const nodes = e.target.assignedNodes();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.292.0",
|
|
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",
|