@equinor/eds-utils
Advanced tools
Comparing version 0.2.1-dev.20220405.1 to 0.2.1-dev.202205096
@@ -194,9 +194,6 @@ 'use strict'; | ||
function _isPlaceholder$3(a) { | ||
function _isPlaceholder(a) { | ||
return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; | ||
} | ||
var _isPlaceholder_1 = _isPlaceholder$3; | ||
var _isPlaceholder$2 = _isPlaceholder_1; | ||
/** | ||
@@ -211,5 +208,5 @@ * Optimized internal one-arity curry function. | ||
function _curry1$2(fn) { | ||
function _curry1(fn) { | ||
return function f1(a) { | ||
if (arguments.length === 0 || _isPlaceholder$2(a)) { | ||
if (arguments.length === 0 || _isPlaceholder(a)) { | ||
return f1; | ||
@@ -222,6 +219,2 @@ } else { | ||
var _curry1_1 = _curry1$2; | ||
var _curry1$1 = _curry1_1; | ||
var _isPlaceholder$1 = _isPlaceholder_1; | ||
/** | ||
@@ -236,3 +229,3 @@ * Optimized internal two-arity curry function. | ||
function _curry2$2(fn) { | ||
function _curry2(fn) { | ||
return function f2(a, b) { | ||
@@ -244,3 +237,3 @@ switch (arguments.length) { | ||
case 1: | ||
return _isPlaceholder$1(a) ? f2 : _curry1$1(function (_b) { | ||
return _isPlaceholder(a) ? f2 : _curry1(function (_b) { | ||
return fn(a, _b); | ||
@@ -250,5 +243,5 @@ }); | ||
default: | ||
return _isPlaceholder$1(a) && _isPlaceholder$1(b) ? f2 : _isPlaceholder$1(a) ? _curry1$1(function (_a) { | ||
return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) { | ||
return fn(_a, b); | ||
}) : _isPlaceholder$1(b) ? _curry1$1(function (_b) { | ||
}) : _isPlaceholder(b) ? _curry1(function (_b) { | ||
return fn(a, _b); | ||
@@ -260,7 +253,2 @@ }) : fn(a, b); | ||
var _curry2_1 = _curry2$2; | ||
var _curry1 = _curry1_1; | ||
var _curry2$1 = _curry2_1; | ||
var _isPlaceholder = _isPlaceholder_1; | ||
/** | ||
@@ -275,3 +263,3 @@ * Optimized internal three-arity curry function. | ||
function _curry3$2(fn) { | ||
function _curry3(fn) { | ||
return function f3(a, b, c) { | ||
@@ -283,3 +271,3 @@ switch (arguments.length) { | ||
case 1: | ||
return _isPlaceholder(a) ? f3 : _curry2$1(function (_b, _c) { | ||
return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) { | ||
return fn(a, _b, _c); | ||
@@ -289,5 +277,5 @@ }); | ||
case 2: | ||
return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2$1(function (_a, _c) { | ||
return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) { | ||
return fn(_a, b, _c); | ||
}) : _isPlaceholder(b) ? _curry2$1(function (_b, _c) { | ||
}) : _isPlaceholder(b) ? _curry2(function (_b, _c) { | ||
return fn(a, _b, _c); | ||
@@ -299,7 +287,7 @@ }) : _curry1(function (_c) { | ||
default: | ||
return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2$1(function (_a, _b) { | ||
return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) { | ||
return fn(_a, _b, c); | ||
}) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2$1(function (_a, _c) { | ||
}) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) { | ||
return fn(_a, b, _c); | ||
}) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2$1(function (_b, _c) { | ||
}) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) { | ||
return fn(a, _b, _c); | ||
@@ -317,18 +305,10 @@ }) : _isPlaceholder(a) ? _curry1(function (_a) { | ||
var _curry3_1 = _curry3$2; | ||
function _has(prop, obj) { | ||
return Object.prototype.hasOwnProperty.call(obj, prop); | ||
} | ||
function _isObject$1(x) { | ||
function _isObject(x) { | ||
return Object.prototype.toString.call(x) === '[object Object]'; | ||
} | ||
var _isObject_1 = _isObject$1; | ||
function _has$1(prop, obj) { | ||
return Object.prototype.hasOwnProperty.call(obj, prop); | ||
} | ||
var _has_1 = _has$1; | ||
var _curry3$1 = _curry3_1; | ||
var _has = _has_1; | ||
/** | ||
@@ -360,3 +340,3 @@ * Creates a new object with the own properties of the two provided objects. If | ||
var mergeWithKey$1 = /*#__PURE__*/_curry3$1(function mergeWithKey(fn, l, r) { | ||
var mergeWithKey = /*#__PURE__*/_curry3(function mergeWithKey(fn, l, r) { | ||
var result = {}; | ||
@@ -380,7 +360,2 @@ var k; | ||
var mergeWithKey_1 = mergeWithKey$1; | ||
var _curry3 = _curry3_1; | ||
var _isObject = _isObject_1; | ||
var mergeWithKey = mergeWithKey_1; | ||
/** | ||
@@ -415,3 +390,3 @@ * Creates a new object with the own properties of the two provided objects. | ||
var mergeDeepWithKey$1 = /*#__PURE__*/_curry3(function mergeDeepWithKey(fn, lObj, rObj) { | ||
var mergeDeepWithKey = /*#__PURE__*/_curry3(function mergeDeepWithKey(fn, lObj, rObj) { | ||
return mergeWithKey(function (k, lVal, rVal) { | ||
@@ -426,6 +401,2 @@ if (_isObject(lVal) && _isObject(rVal)) { | ||
var mergeDeepWithKey_1 = mergeDeepWithKey$1; | ||
var _curry2 = _curry2_1; | ||
var mergeDeepWithKey = mergeDeepWithKey_1; | ||
/** | ||
@@ -459,5 +430,2 @@ * Creates a new object with the own properties of the first object merged with | ||
var mergeDeepRight_1 = mergeDeepRight; | ||
var mergeDeepRight$1 = mergeDeepRight_1; | ||
const useToken = (options, token) => react.useCallback(() => { | ||
@@ -469,3 +437,3 @@ const { | ||
if (density === 'compact') { | ||
return mergeDeepRight$1(token, token.modes.compact); | ||
return mergeDeepRight(token, token.modes.compact); | ||
} | ||
@@ -472,0 +440,0 @@ |
import { useCallback } from 'react'; | ||
import mergeDeepRight from '../node_modules/.pnpm/ramda@0.27.2/node_modules/ramda/src/mergeDeepRight.js'; | ||
import mergeDeepRight from '../node_modules/.pnpm/ramda@0.27.2/node_modules/ramda/es/mergeDeepRight.js'; | ||
@@ -4,0 +4,0 @@ const useToken = (options, token) => useCallback(() => { |
@@ -1,4 +0,4 @@ | ||
export { trimSpaces } from './utils/index.js'; | ||
export { useOutsideClick } from './hooks/useOutsideClick.js'; | ||
export { useCombinedRefs } from './hooks/useCombinedRefs.js'; | ||
export { usePopper } from './hooks/usePopper.js'; | ||
export { useGlobalKeyPress } from './hooks/useGlobalKeyPress.js'; | ||
@@ -8,5 +8,5 @@ export { useId } from './hooks/useId.js'; | ||
export { useAutoResize } from './hooks/useAutoResize.js'; | ||
export { useToken } from './hooks/useToken.js'; | ||
export { useHideBodyScroll } from './hooks/useHideBodyScroll.js'; | ||
export { usePopper } from './hooks/usePopper.js'; | ||
export { useToken } from './hooks/useToken.js'; | ||
export { trimSpaces } from './utils/index.js'; | ||
export { joinHandlers } from './utils/joinHandlers.js'; | ||
@@ -13,0 +13,0 @@ export { setReactInputValue } from './utils/setReactInputValue.js'; |
@@ -0,3 +1,6 @@ | ||
import 'styled-components'; | ||
import '@equinor/eds-tokens'; | ||
const trimSpaces = text => text.replace(/ /g, ''); | ||
export { trimSpaces }; |
import { css } from 'styled-components'; | ||
import '@equinor/eds-tokens'; | ||
@@ -3,0 +4,0 @@ const typographyTemplate = (typography, link) => { |
{ | ||
"name": "@equinor/eds-utils", | ||
"version": "0.2.1-dev.20220405.1", | ||
"version": "0.2.1-dev.202205096", | ||
"description": "Utility functions and hooks for the Equinor Design System", | ||
@@ -34,24 +34,25 @@ "sideEffects": false, | ||
"devDependencies": { | ||
"@babel/cli": "^7.17.6", | ||
"@babel/core": "^7.17.8", | ||
"@babel/plugin-transform-runtime": "^7.17.0", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/cli": "^7.17.10", | ||
"@babel/core": "^7.17.10", | ||
"@babel/plugin-transform-runtime": "^7.17.10", | ||
"@babel/preset-env": "^7.17.10", | ||
"@babel/preset-react": "^7.16.7", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^19.0.2", | ||
"@rollup/plugin-node-resolve": "^13.1.3", | ||
"@testing-library/jest-dom": "^5.16.2", | ||
"@testing-library/react": "^12.1.2", | ||
"@rollup/plugin-babel": "^5.3.1", | ||
"@rollup/plugin-commonjs": "^22.0.0", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
"@testing-library/react": "^12.1.5", | ||
"@testing-library/react-hooks": "^7.0.2", | ||
"@testing-library/user-event": "^13.5.0", | ||
"@types/jest": "^26.0.24", | ||
"@types/ramda": "^0.27.64", | ||
"@types/react": "^17.0.43", | ||
"@types/react-dom": "^17.0.14", | ||
"@types/styled-components": "^5.1.24", | ||
"@types/testing-library__jest-dom": "^5.14.2", | ||
"babel-loader": "^8.2.3", | ||
"babel-plugin-styled-components": "^1.13.3", | ||
"jest": "^27.5.0", | ||
"@types/jest": "^27.5.0", | ||
"@types/ramda": "^0.27.66", | ||
"@types/react": "^17.0.44", | ||
"@types/react-dom": "^17.0.16", | ||
"@types/styled-components": "^5.1.25", | ||
"@types/testing-library__jest-dom": "^5.14.3", | ||
"babel-loader": "^8.2.5", | ||
"babel-plugin-styled-components": "^2.0.7", | ||
"jest": "^28.0.3", | ||
"jest-environment-jsdom": "^28.0.2", | ||
"jest-styled-components": "^7.0.8", | ||
@@ -62,7 +63,7 @@ "js-file-download": "^0.4.12", | ||
"react-dom": "^17.0.2", | ||
"rollup": "^2.67.1", | ||
"rollup": "^2.72.0", | ||
"rollup-plugin-delete": "^2.0.0", | ||
"styled-components": "5.3.0", | ||
"tsc-watch": "^4.6.0", | ||
"typescript": "^4.6.3" | ||
"styled-components": "5.3.5", | ||
"tsc-watch": "^5.0.3", | ||
"typescript": "^4.6.4" | ||
}, | ||
@@ -75,4 +76,4 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@babel/runtime": "^7.17.8", | ||
"@equinor/eds-tokens": "0.7.0", | ||
"@babel/runtime": "^7.17.9", | ||
"@equinor/eds-tokens": "0.7.0-dev.202205096", | ||
"@popperjs/core": "2.9.2", | ||
@@ -89,6 +90,6 @@ "react-popper": "2.2.5" | ||
"test": "tsc -p tsconfig.test.json && jest", | ||
"test:watch": "tsc-watch -p tsconfig.test.json --onFirstSuccess \"jest --watch\"" | ||
"test:watch": "tsc-watch -p tsconfig.test.json --onFirstSuccess \"jest --watch\"", | ||
"types": "tsc" | ||
}, | ||
"module": "dist/esm/index.js", | ||
"readme": "# @equinor/eds-utils\n\nThis package host hooks and utility functions that are used by [eds-core-react](https://www.npmjs.com/package/@equinor/eds-core-react) and [eds-lab-react](https://www.npmjs.com/package/@equinor/eds-lab-react).\n\n## Installation\n\n```sh\nnpm install @equinor/eds-utils\n```\nIf you use Typescript, make sure you have typescript >= 3.8 as a devDependency:\n```sh\nnpm install typescript --save-dev\n```\n" | ||
"module": "dist/esm/index.js" | ||
} |
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
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
43595
33
1216
+ Added@equinor/eds-tokens@0.7.0-dev.202205096(transitive)
- Removed@equinor/eds-tokens@0.7.0(transitive)
Updated@babel/runtime@^7.17.9