@aqovia-elements/stacked-sheet
Advanced tools
Comparing version 1.0.127 to 1.0.134
@@ -8,6 +8,7 @@ { | ||
], | ||
"version": "1.0.127", | ||
"version": "1.0.134", | ||
"description": "Webcomponent stacked-sheet with lit-element and open-wc recommendations", | ||
"license": "MIT", | ||
"dependencies": { | ||
"body-scroll-lock": "^4.0.0-beta.0", | ||
"lit-element": "^2.0.1", | ||
@@ -26,6 +27,6 @@ "lit-html": "^1.1.0" | ||
"pipelines-npm-audit": "node build_scripts/pipelines-npm-audit", | ||
"test": "karma start karma.config.js --coverage", | ||
"test:watch": "karma start karma.config.js --auto-watch=true --single-run=false", | ||
"test:es5": "karma start karma.config.js --legacy --coverage", | ||
"test:es5:watch": "karma start karma.config.js --legacy --auto-watch=true --single-run=false" | ||
"test": "karma start --coverage", | ||
"test:watch": "karma start --auto-watch=true --single-run=false", | ||
"test:es5": "karma start --legacy --coverage", | ||
"test:es5:watch": "karma start --legacy --auto-watch=true --single-run=false" | ||
}, | ||
@@ -37,7 +38,7 @@ "devDependencies": { | ||
"@open-wc/prettier-config": "^0.1.10", | ||
"@open-wc/testing": "^0.11.4", | ||
"@open-wc/testing-karma": "^1.1.1", | ||
"@open-wc/testing": "^2.5.33", | ||
"@open-wc/testing-karma": "^4.0.9", | ||
"@webcomponents/webcomponentsjs": "^2.2.10", | ||
"del-cli": "^4.0.1", | ||
"fast-async": "^6.3.8", | ||
"del-cli": "^2.0.0", | ||
"rollup": "^1.19.4", | ||
@@ -51,2 +52,3 @@ "rollup-plugin-analyzer": "^3.0.0", | ||
"rollup-plugin-html-scaffold": "^0.1.2", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-livereload": "^1.0.0", | ||
@@ -56,3 +58,2 @@ "rollup-plugin-node-resolve": "^4.2.3", | ||
"rollup-plugin-serve": "^1.0.1", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-url": "^2.2.2", | ||
@@ -59,0 +60,0 @@ "webpack-merge": "^4.2.1" |
import { LitElement, html } from "lit-element"; | ||
import { nothing } from "lit-html"; | ||
import { disableBodyScroll, clearAllBodyScrollLocks } from "body-scroll-lock"; | ||
import { styleMap } from "lit-html/directives/style-map.js"; | ||
@@ -41,2 +42,5 @@ import { StackedSheetStyles } from "../styles/stacked-sheet-styles.js"; | ||
this.dispatchEvent(sheetOpenedEvent); | ||
if (this._numberOfSheetsBefore === 0) { | ||
disableBodyScroll(this); | ||
} | ||
} | ||
@@ -53,2 +57,6 @@ | ||
}, this.sheetCloseDelay * 1000); | ||
if (this._numberOfSheetsBefore === 0) { | ||
clearAllBodyScrollLocks(); | ||
} | ||
} | ||
@@ -87,2 +95,14 @@ | ||
get _numberOfSheetsBefore() { | ||
let count = 0; | ||
let currentSheet = this; | ||
while (currentSheet.previousElementSibling != null) { | ||
currentSheet = currentSheet.previousElementSibling; | ||
if (currentSheet.opened) count += 1; | ||
} | ||
return count; | ||
} | ||
render() { | ||
@@ -89,0 +109,0 @@ const sheetOverlayStyle = { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14546
326
3
+ Addedbody-scroll-lock@4.0.0-beta.0(transitive)