Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@instructure/ui-layout

Package Overview
Dependencies
Maintainers
31
Versions
940
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/ui-layout - npm Package Compare versions

Comparing version 5.12.0 to 5.13.0-rc.2

12

es/utils/calculateElementPosition.js

@@ -143,2 +143,9 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();

}, {
key: 'normalizeScrollTop',
value: function normalizeScrollTop(element) {
// Account for cross browser differences with scrollTop attribute on the
// body element https://bugs.chromium.org/p/chromium/issues/detail?id=766938
return ownerDocument(this.node).body === element ? 0 : element.scrollTop;
}
}, {
key: 'width',

@@ -206,3 +213,3 @@ get: function get() {

offsetY = offsetY + (parent.scrollTop - child.scrollTop);
offsetY = offsetY + (this.normalizeScrollTop(parent) - this.normalizeScrollTop(child));
offsetX = offsetX + (parent.scrollLeft - child.scrollLeft);

@@ -232,3 +239,4 @@ }

offsetX = offsetX + (child.left - parent.left);
scrollY = scrollY + parents[i].scrollTop;
scrollY = scrollY + this.normalizeScrollTop(parents[i]);
}

@@ -235,0 +243,0 @@ // Account for any scrolling on positioned parents

@@ -175,2 +175,9 @@ 'use strict';

}, {
key: 'normalizeScrollTop',
value: function normalizeScrollTop(element) {
// Account for cross browser differences with scrollTop attribute on the
// body element https://bugs.chromium.org/p/chromium/issues/detail?id=766938
return (0, _ownerDocument2.default)(this.node).body === element ? 0 : element.scrollTop;
}
}, {
key: 'width',

@@ -238,3 +245,3 @@ get: function get() {

offsetY = offsetY + (parent.scrollTop - child.scrollTop);
offsetY = offsetY + (this.normalizeScrollTop(parent) - this.normalizeScrollTop(child));
offsetX = offsetX + (parent.scrollLeft - child.scrollLeft);

@@ -264,3 +271,4 @@ }

offsetX = offsetX + (child.left - parent.left);
scrollY = scrollY + parents[i].scrollTop;
scrollY = scrollY + this.normalizeScrollTop(parents[i]);
}

@@ -267,0 +275,0 @@ // Account for any scrolling on positioned parents

20

package.json
{
"name": "@instructure/ui-layout",
"version": "5.12.0",
"version": "5.13.0-rc.2",
"description": "A UI component library made by Instructure Inc.",

@@ -25,5 +25,5 @@ "author": "Instructure, Inc. Engineering and Product Design",

"devDependencies": {
"@instructure/ui-presets": "^5.12.0",
"@instructure/ui-testbed": "^5.12.0",
"@instructure/ui-themes": "^5.12.0",
"@instructure/ui-presets": "^5.13.0-rc.2",
"@instructure/ui-testbed": "^5.13.0-rc.2",
"@instructure/ui-themes": "^5.13.0-rc.2",
"postcss-mixins": "6.2.0",

@@ -35,7 +35,7 @@ "postcss-simple-vars": "4.1.0",

"dependencies": {
"@instructure/ui-i18n": "^5.12.0",
"@instructure/ui-motion": "^5.12.0",
"@instructure/ui-portal": "^5.12.0",
"@instructure/ui-themeable": "^5.12.0",
"@instructure/ui-utils": "^5.12.0",
"@instructure/ui-i18n": "^5.13.0-rc.2",
"@instructure/ui-motion": "^5.13.0-rc.2",
"@instructure/ui-portal": "^5.13.0-rc.2",
"@instructure/ui-themeable": "^5.13.0-rc.2",
"@instructure/ui-utils": "^5.13.0-rc.2",
"classnames": "^2.2.5",

@@ -51,3 +51,3 @@ "prop-types": "^15.5.10"

},
"gitHead": "08d1b0bc6d70c6315bd174b63b9674d0fd919812"
"gitHead": "55e5ed2cdbe106a7960f44ed948cea27afbee69f"
}

@@ -179,3 +179,3 @@ /*

offsetY = offsetY + (parent.scrollTop - child.scrollTop)
offsetY = offsetY + (this.normalizeScrollTop(parent) - this.normalizeScrollTop(child))
offsetX = offsetX + (parent.scrollLeft - child.scrollLeft)

@@ -204,3 +204,4 @@ }

offsetX = offsetX + (child.left - parent.left)
scrollY = scrollY + parents[i].scrollTop
scrollY = scrollY + this.normalizeScrollTop(parents[i])
}

@@ -214,2 +215,8 @@ // Account for any scrolling on positioned parents

}
normalizeScrollTop (element) {
// Account for cross browser differences with scrollTop attribute on the
// body element https://bugs.chromium.org/p/chromium/issues/detail?id=766938
return ownerDocument(this.node).body === element ? 0 : element.scrollTop
}
}

@@ -216,0 +223,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc