@turquoisehealth/pit-viper 2.114.0 → 2.114.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.
- package/_site/assets/js/pit-viper.js +9 -11
- package/package.json +1 -1
|
@@ -179,7 +179,7 @@ class PVAutoClose extends HTMLElement {
|
|
|
179
179
|
}
|
|
180
180
|
customElements.define('pv-data-grid', PVDataGrid);
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
class PvGlobalNav extends HTMLElement {
|
|
183
183
|
constructor() {
|
|
184
184
|
super();
|
|
185
185
|
this.hoverTimeout = null;
|
|
@@ -243,7 +243,7 @@ class PVAutoClose extends HTMLElement {
|
|
|
243
243
|
updateIcons(button, isExpanded) {
|
|
244
244
|
const use = button.querySelector('svg use');
|
|
245
245
|
const tooltip = document.getElementById('description');
|
|
246
|
-
use.
|
|
246
|
+
use.setAttribute('href', isExpanded ? '#panel-left-close' : '#panel-left-open');
|
|
247
247
|
if (tooltip) tooltip.querySelector('p').textContent = isExpanded ? 'Close Sidebar' : 'Open Sidebar';
|
|
248
248
|
}
|
|
249
249
|
|
|
@@ -311,25 +311,23 @@ class PVAutoClose extends HTMLElement {
|
|
|
311
311
|
}
|
|
312
312
|
});
|
|
313
313
|
this.toggleMenu(clickedMenu);
|
|
314
|
-
this.style.overflowX = 'initial';
|
|
315
314
|
if (!this.layout.hasAttribute('data-expanded')) {
|
|
316
315
|
this.hoverExpandState();
|
|
317
316
|
}
|
|
318
317
|
return;
|
|
319
318
|
}
|
|
319
|
+
// clicked outside any menu, close all menus
|
|
320
|
+
allMenus.forEach(menu => menu.removeAttribute('data-active'));
|
|
321
|
+
|
|
320
322
|
// if outside sidebar, remove 'data-floating;
|
|
321
323
|
if (!inSidebar) {
|
|
322
324
|
this.layout.removeAttribute('data-floating');
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
allMenus.forEach(menu => menu.removeAttribute('data-active'));
|
|
327
|
-
this.style.overflowX = 'hidden';
|
|
328
|
-
if (!this.layout.hasAttribute('data-collapsed') && !this.layout.hasAttribute('data-expanded')) {
|
|
329
|
-
this.hoverCollapseState();
|
|
325
|
+
if (!this.layout.hasAttribute('data-collapsed') && !this.layout.hasAttribute('data-expanded')) {
|
|
326
|
+
this.hoverCollapseState();
|
|
327
|
+
}
|
|
330
328
|
}
|
|
331
329
|
}
|
|
332
330
|
}
|
|
333
331
|
|
|
334
|
-
customElements.define('pv-global-nav', PvGlobalNav
|
|
332
|
+
customElements.define('pv-global-nav', PvGlobalNav);
|
|
335
333
|
})();
|