@odx/foundation 1.0.0-rc.8 → 1.0.0-rc.9
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/CHANGELOG.md +7 -0
- package/dist/lib/scroll-lock.js +6 -6
- package/package.json +10 -12
- package/types/styles.d.ts +0 -3
package/CHANGELOG.md
CHANGED
package/dist/lib/scroll-lock.js
CHANGED
|
@@ -2,16 +2,16 @@ const scrollLockClass = "odx-scroll-lock";
|
|
|
2
2
|
const scrollLocks = /* @__PURE__ */ new Set();
|
|
3
3
|
/** @internal */
|
|
4
4
|
function applyScrollLock(source) {
|
|
5
|
-
const
|
|
5
|
+
const { documentElement } = document;
|
|
6
6
|
scrollLocks.add(source);
|
|
7
|
-
if (
|
|
7
|
+
if (documentElement.classList.contains(scrollLockClass)) return;
|
|
8
8
|
const bodyPadding = Number(getComputedStyle(document.body).paddingRight.replace("px", ""));
|
|
9
|
-
let scrollbarWidth = Math.abs(window.innerWidth -
|
|
9
|
+
let scrollbarWidth = Math.abs(window.innerWidth - documentElement.clientWidth);
|
|
10
10
|
if (!Number.isNaN(bodyPadding) && bodyPadding > 0) scrollbarWidth += bodyPadding;
|
|
11
|
-
let { scrollbarGutter } = getComputedStyle(
|
|
11
|
+
let { scrollbarGutter } = getComputedStyle(documentElement);
|
|
12
12
|
if (!scrollbarGutter || scrollbarGutter === "auto") scrollbarGutter = "stable";
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
documentElement.classList.add(scrollLockClass);
|
|
14
|
+
documentElement.style.setProperty("--odx-scroll-lock-gutter", scrollbarWidth > 1 ? scrollbarGutter : "");
|
|
15
15
|
}
|
|
16
16
|
/** @internal */
|
|
17
17
|
function removeScrollLock(source) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@odx/foundation",
|
|
3
3
|
"displayName": "ODX Design System Foundation",
|
|
4
4
|
"description": "The design foundation of the ODX Design System, providing base styles and utilities",
|
|
5
|
-
"version": "1.0.0-rc.
|
|
5
|
+
"version": "1.0.0-rc.9",
|
|
6
6
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
|
8
8
|
"homepage": "https://odx.draeger.com",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"@odx/design-tokens": "^4.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@tsdown/css": "0.22.
|
|
23
|
+
"@tsdown/css": "0.22.2",
|
|
24
24
|
"lit": "3.3.3",
|
|
25
|
-
"stylelint": "17.
|
|
26
|
-
"tsdown": "0.22.
|
|
25
|
+
"stylelint": "17.13.0",
|
|
26
|
+
"tsdown": "0.22.2",
|
|
27
27
|
"@odx-internal/config-stylelint": "0.0.0",
|
|
28
28
|
"@odx-internal/utils-storybook": "0.0.0"
|
|
29
29
|
},
|
|
@@ -35,27 +35,25 @@
|
|
|
35
35
|
],
|
|
36
36
|
"exports": {
|
|
37
37
|
"./package.json": "./package.json",
|
|
38
|
+
"./CHANGELOG.md": "./CHANGELOG.md",
|
|
38
39
|
".": {
|
|
39
|
-
"
|
|
40
|
-
"
|
|
40
|
+
"types": "./dist/main.d.ts",
|
|
41
|
+
"import": "./dist/main.js"
|
|
41
42
|
},
|
|
42
43
|
"./styles": {
|
|
43
|
-
"
|
|
44
|
-
"
|
|
44
|
+
"types": "./types.d.ts",
|
|
45
|
+
"import": "./dist/styles.css"
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
48
|
"publishConfig": {
|
|
48
49
|
"access": "public",
|
|
49
50
|
"tag": "latest"
|
|
50
51
|
},
|
|
51
|
-
"stylelint": {
|
|
52
|
-
"extends": "@odx-internal/config-stylelint"
|
|
53
|
-
},
|
|
54
52
|
"scripts": {
|
|
55
53
|
"build": "tsdown",
|
|
56
54
|
"dev": "tsdown --log-level error --no-clean --watch",
|
|
57
55
|
"dev:tsc": "tsc --build tsconfig.lib.json --noEmit --watch",
|
|
58
56
|
"lint": "biome lint src",
|
|
59
|
-
"lint:styles": "stylelint '**/*.css'"
|
|
57
|
+
"lint:styles": "stylelint '**/*.css' --config @odx-internal/config-stylelint"
|
|
60
58
|
}
|
|
61
59
|
}
|
package/types/styles.d.ts
DELETED