@instructure/ui-utils
Advanced tools
Comparing version 8.56.4 to 8.56.5-pr-snapshot-1728655013879
@@ -6,2 +6,10 @@ # Change Log | ||
## [8.56.5-pr-snapshot-1728655013879](https://github.com/instructure/instructure-ui/compare/v8.56.4...v8.56.5-pr-snapshot-1728655013879) (2024-10-11) | ||
**Note:** Version bump only for package @instructure/ui-utils | ||
## [8.56.4](https://github.com/instructure/instructure-ui/compare/v8.56.3...v8.56.4) (2024-10-02) | ||
@@ -8,0 +16,0 @@ |
"use strict"; | ||
require("@testing-library/jest-dom"); | ||
var _getFontSize = require("@instructure/ui-dom-utils/lib/getFontSize.js"); | ||
var _uiDomUtils = require("@instructure/ui-dom-utils"); | ||
var _px = require("../px"); | ||
@@ -44,7 +44,7 @@ /* | ||
it('converts rem to px', () => { | ||
expect((0, _px.px)('50rem')).toEqual(50 * (0, _getFontSize.getFontSize)()); | ||
expect((0, _px.px)('50rem')).toEqual(50 * (0, _uiDomUtils.getFontSize)()); | ||
}); | ||
it('converts em to px', () => { | ||
node.style.fontSize = '24px'; | ||
expect((0, _px.px)('10em', node)).toEqual(10 * (0, _getFontSize.getFontSize)(node)); | ||
expect((0, _px.px)('10em', node)).toEqual(10 * (0, _uiDomUtils.getFontSize)(node)); | ||
}); | ||
@@ -51,0 +51,0 @@ it('handles unitless input', () => { |
@@ -10,4 +10,3 @@ "use strict"; | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var _canUseDOM = require("@instructure/ui-dom-utils/lib/canUseDOM.js"); | ||
var _getFontSize = require("@instructure/ui-dom-utils/lib/getFontSize.js"); | ||
var _uiDomUtils = require("@instructure/ui-dom-utils"); | ||
var _parseUnit3 = require("./parseUnit"); | ||
@@ -65,7 +64,7 @@ /* | ||
if (unit === 'rem') { | ||
return num * (0, _getFontSize.getFontSize)(); | ||
return num * (0, _uiDomUtils.getFontSize)(); | ||
} else if (unit === 'em') { | ||
const doc = _canUseDOM.canUseDOM ? document.body : null; | ||
const doc = _uiDomUtils.canUseDOM ? document.body : null; | ||
const container = el || doc; | ||
return num * (0, _getFontSize.getFontSize)(container); | ||
return num * (0, _uiDomUtils.getFontSize)(container); | ||
} else { | ||
@@ -72,0 +71,0 @@ return num; |
{ | ||
"name": "@instructure/ui-utils", | ||
"version": "8.56.4", | ||
"version": "8.56.5-pr-snapshot-1728655013879", | ||
"description": "A collection of utilities for UI components", | ||
@@ -25,3 +25,3 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"devDependencies": { | ||
"@instructure/ui-babel-preset": "8.56.4", | ||
"@instructure/ui-babel-preset": "8.56.5-pr-snapshot-1728655013879", | ||
"@testing-library/jest-dom": "^6.1.4", | ||
@@ -33,4 +33,4 @@ "@testing-library/react": "^14.1.2", | ||
"@babel/runtime": "^7.23.2", | ||
"@instructure/console": "8.56.4", | ||
"@instructure/ui-dom-utils": "8.56.4", | ||
"@instructure/console": "8.56.5-pr-snapshot-1728655013879", | ||
"@instructure/ui-dom-utils": "8.56.5-pr-snapshot-1728655013879", | ||
"@types/ua-parser-js": "^0.7.37", | ||
@@ -37,0 +37,0 @@ "bowser": "^2.11.0", |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
397592
6837
1
+ Added@instructure/console@8.56.5-pr-snapshot-1728655013879(transitive)
+ Added@instructure/shared-types@8.56.5-pr-snapshot-1728655013879(transitive)
+ Added@instructure/ui-dom-utils@8.56.5-pr-snapshot-1728655013879(transitive)
- Removed@instructure/console@8.56.4(transitive)
- Removed@instructure/shared-types@8.56.4(transitive)
- Removed@instructure/ui-dom-utils@8.56.4(transitive)
Updated@instructure/console@8.56.5-pr-snapshot-1728655013879
Updated@instructure/ui-dom-utils@8.56.5-pr-snapshot-1728655013879