Socket
Socket
Sign inDemoInstall

@instructure/ui-utils

Package Overview
Dependencies
Maintainers
33
Versions
1950
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.2-pr-snapshot-1721749364069 to 8.56.2-snapshot-2

2

CHANGELOG.md

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

## [8.56.2-pr-snapshot-1721749364069](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2-pr-snapshot-1721749364069) (2024-07-23)
## [8.56.2-snapshot-2](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2-snapshot-2) (2024-08-06)

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

"use strict";
require("@testing-library/jest-dom");
var _uiDomUtils = require("@instructure/ui-dom-utils");
var _getFontSize = require("@instructure/ui-dom-utils/lib/getFontSize.js");
var _px = require("../px");

@@ -44,7 +44,7 @@ /*

it('converts rem to px', () => {
expect((0, _px.px)('50rem')).toEqual(50 * (0, _uiDomUtils.getFontSize)());
expect((0, _px.px)('50rem')).toEqual(50 * (0, _getFontSize.getFontSize)());
});
it('converts em to px', () => {
node.style.fontSize = '24px';
expect((0, _px.px)('10em', node)).toEqual(10 * (0, _uiDomUtils.getFontSize)(node));
expect((0, _px.px)('10em', node)).toEqual(10 * (0, _getFontSize.getFontSize)(node));
});

@@ -51,0 +51,0 @@ it('handles unitless input', () => {

@@ -10,3 +10,4 @@ "use strict";

var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _uiDomUtils = require("@instructure/ui-dom-utils");
var _canUseDOM = require("@instructure/ui-dom-utils/lib/canUseDOM.js");
var _getFontSize = require("@instructure/ui-dom-utils/lib/getFontSize.js");
var _parseUnit3 = require("./parseUnit");

@@ -64,7 +65,7 @@ /*

if (unit === 'rem') {
return num * (0, _uiDomUtils.getFontSize)();
return num * (0, _getFontSize.getFontSize)();
} else if (unit === 'em') {
const doc = _uiDomUtils.canUseDOM ? document.body : null;
const doc = _canUseDOM.canUseDOM ? document.body : null;
const container = el || doc;
return num * (0, _uiDomUtils.getFontSize)(container);
return num * (0, _getFontSize.getFontSize)(container);
} else {

@@ -71,0 +72,0 @@ return num;

{
"name": "@instructure/ui-utils",
"version": "8.56.2-pr-snapshot-1721749364069",
"version": "8.56.2-snapshot-2",
"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.2-pr-snapshot-1721749364069",
"@instructure/ui-babel-preset": "8.56.2-snapshot-2",
"@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.2-pr-snapshot-1721749364069",
"@instructure/ui-dom-utils": "8.56.2-pr-snapshot-1721749364069",
"@instructure/console": "8.56.2-snapshot-2",
"@instructure/ui-dom-utils": "8.56.2-snapshot-2",
"@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