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

@instructure/ui-utils

Package Overview
Dependencies
Maintainers
33
Versions
2044
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/ui-utils - npm Package Compare versions

Comparing version 8.56.5-pr-snapshot-1729507712924 to 8.56.5-pr-snapshot-1729546148514

2

CHANGELOG.md

@@ -6,3 +6,3 @@ # Change Log

## [8.56.5-pr-snapshot-1729507712924](https://github.com/instructure/instructure-ui/compare/v8.56.4...v8.56.5-pr-snapshot-1729507712924) (2024-10-21)
## [8.56.5-pr-snapshot-1729546148514](https://github.com/instructure/instructure-ui/compare/v8.56.4...v8.56.5-pr-snapshot-1729546148514) (2024-10-21)

@@ -9,0 +9,0 @@ **Note:** Version bump only for package @instructure/ui-utils

"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.5-pr-snapshot-1729507712924",
"version": "8.56.5-pr-snapshot-1729546148514",
"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.5-pr-snapshot-1729507712924",
"@instructure/ui-babel-preset": "8.56.5-pr-snapshot-1729546148514",
"@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.5-pr-snapshot-1729507712924",
"@instructure/ui-dom-utils": "8.56.5-pr-snapshot-1729507712924",
"@instructure/console": "8.56.5-pr-snapshot-1729546148514",
"@instructure/ui-dom-utils": "8.56.5-pr-snapshot-1729546148514",
"@types/ua-parser-js": "^0.7.37",

@@ -37,0 +37,0 @@ "bowser": "^2.11.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