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

@instructure/emotion

Package Overview
Dependencies
Maintainers
26
Versions
942
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/emotion - npm Package Compare versions

Comparing version 8.2.2-snapshot.2 to 8.2.2-snapshot.3

6

es/getComponentThemeOverride.js

@@ -1,3 +0,1 @@

import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
/*

@@ -43,3 +41,5 @@ * The MIT License (MIT)

const componentOverride = (theme === null || theme === void 0 ? void 0 : theme.componentOverrides) && theme.componentOverrides[componentName];
return _objectSpread(_objectSpread({}, componentOverride), (_props$themeOverride = props === null || props === void 0 ? void 0 : props.themeOverride) !== null && _props$themeOverride !== void 0 ? _props$themeOverride : {});
return { ...componentOverride,
...((_props$themeOverride = props === null || props === void 0 ? void 0 : props.themeOverride) !== null && _props$themeOverride !== void 0 ? _props$themeOverride : {})
};
};

@@ -1,2 +0,1 @@

import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import { log as _log } from "@instructure/console";

@@ -133,5 +132,5 @@ import { isObject } from 'lodash';

if (isObject(originalValue)) {
return _objectSpread(_objectSpread({}, accumulator), {}, {
return { ...accumulator,
[originalProp]: processStyleProps(originalValue, dir)
});
};
}

@@ -147,14 +146,14 @@

return _objectSpread(_objectSpread({}, accumulator), {}, {
return { ...accumulator,
[prop]: value
});
};
}
return _objectSpread(_objectSpread({}, accumulator), {}, {
return { ...accumulator,
[originalProp]: originalValue
});
};
}, {}) : propsObj;
export const bidirectionalPolyfill = (styles, dir) => Object.entries(styles).reduce((accumulator, [style, props]) => _objectSpread(_objectSpread({}, accumulator), {}, {
export const bidirectionalPolyfill = (styles, dir) => Object.entries(styles).reduce((accumulator, [style, props]) => ({ ...accumulator,
[style]: processStyleProps(props, dir)
}), {});
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";

@@ -131,7 +130,9 @@ /*

const dir = useTextDirectionContext();
const componentProps = _objectSpread(_objectSpread({}, ComposedComponent.defaultProps), props);
const componentProps = { ...ComposedComponent.defaultProps,
...props
};
const themeOverride = getComponentThemeOverride(theme, displayName, componentProps);
const componentTheme = typeof generateComponentTheme === 'function' ? _objectSpread(_objectSpread({}, generateComponentTheme(theme)), themeOverride) : {};
const componentTheme = typeof generateComponentTheme === 'function' ? { ...generateComponentTheme(theme),
...themeOverride
} : {};

@@ -167,6 +168,6 @@ const _useState = useState(generateStyle ? bidirectionalPolyfill(generateStyle(componentTheme, componentProps, {}), dir) : {}),

ComposedComponent.defaultProps = _objectSpread(_objectSpread({}, ComposedComponent.defaultProps), {}, {
ComposedComponent.defaultProps = { ...ComposedComponent.defaultProps,
makeStyles: () => {},
styles: {}
});
};

@@ -173,0 +174,0 @@ if (process.env.NODE_ENV !== 'production') {

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {

@@ -10,4 +8,2 @@ value: true

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
/*

@@ -53,5 +49,7 @@ * The MIT License (MIT)

const componentOverride = (theme === null || theme === void 0 ? void 0 : theme.componentOverrides) && theme.componentOverrides[componentName];
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, componentOverride), (_props$themeOverride = props === null || props === void 0 ? void 0 : props.themeOverride) !== null && _props$themeOverride !== void 0 ? _props$themeOverride : {});
return { ...componentOverride,
...((_props$themeOverride = props === null || props === void 0 ? void 0 : props.themeOverride) !== null && _props$themeOverride !== void 0 ? _props$themeOverride : {})
};
};
exports.getComponentThemeOverride = getComponentThemeOverride;
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {

@@ -10,4 +8,2 @@ value: true

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _console = require("@instructure/console");

@@ -145,5 +141,5 @@

if ((0, _lodash.isObject)(originalValue)) {
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, accumulator), {}, {
return { ...accumulator,
[originalProp]: processStyleProps(originalValue, dir)
});
};
}

@@ -159,13 +155,13 @@

return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, accumulator), {}, {
return { ...accumulator,
[prop]: value
});
};
}
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, accumulator), {}, {
return { ...accumulator,
[originalProp]: originalValue
});
};
}, {}) : propsObj;
const bidirectionalPolyfill = (styles, dir) => Object.entries(styles).reduce((accumulator, [style, props]) => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, accumulator), {}, {
const bidirectionalPolyfill = (styles, dir) => Object.entries(styles).reduce((accumulator, [style, props]) => ({ ...accumulator,
[style]: processStyleProps(props, dir)

@@ -172,0 +168,0 @@ }), {});

@@ -14,4 +14,2 @@ "use strict";

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _react = _interopRequireWildcard(require("react"));

@@ -152,5 +150,9 @@

const dir = (0, _uiI18n.useTextDirectionContext)();
const componentProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, ComposedComponent.defaultProps), props);
const componentProps = { ...ComposedComponent.defaultProps,
...props
};
const themeOverride = (0, _getComponentThemeOverride.getComponentThemeOverride)(theme, displayName, componentProps);
const componentTheme = typeof generateComponentTheme === 'function' ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, generateComponentTheme(theme)), themeOverride) : {};
const componentTheme = typeof generateComponentTheme === 'function' ? { ...generateComponentTheme(theme),
...themeOverride
} : {};

@@ -186,6 +188,6 @@ const _useState = (0, _react.useState)(generateStyle ? (0, _bidirectionalPolyfill.bidirectionalPolyfill)(generateStyle(componentTheme, componentProps, {}), dir) : {}),

ComposedComponent.defaultProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, ComposedComponent.defaultProps), {}, {
ComposedComponent.defaultProps = { ...ComposedComponent.defaultProps,
makeStyles: () => {},
styles: {}
});
};

@@ -192,0 +194,0 @@ if (process.env.NODE_ENV !== 'production') {

{
"name": "@instructure/emotion",
"version": "8.2.2-snapshot.2+61e153c8a",
"version": "8.2.2-snapshot.3+e23eea66b",
"description": "A UI component library made by Instructure Inc.",

@@ -29,7 +29,7 @@ "author": "Instructure, Inc. Engineering and Product Design",

"@emotion/core": "^10.0.35",
"@instructure/console": "8.2.2-snapshot.2+61e153c8a",
"@instructure/ui-decorator": "8.2.2-snapshot.2+61e153c8a",
"@instructure/ui-i18n": "8.2.2-snapshot.2+61e153c8a",
"@instructure/ui-themes": "8.2.2-snapshot.2+61e153c8a",
"@instructure/ui-utils": "8.2.2-snapshot.2+61e153c8a",
"@instructure/console": "8.2.2-snapshot.3+e23eea66b",
"@instructure/ui-decorator": "8.2.2-snapshot.3+e23eea66b",
"@instructure/ui-i18n": "8.2.2-snapshot.3+e23eea66b",
"@instructure/ui-themes": "8.2.2-snapshot.3+e23eea66b",
"@instructure/ui-utils": "8.2.2-snapshot.3+e23eea66b",
"emotion-theming": "^10.0.27",

@@ -41,4 +41,4 @@ "hoist-non-react-statics": "^3.3.2",

"devDependencies": {
"@instructure/ui-babel-preset": "8.2.2-snapshot.2+61e153c8a",
"@instructure/ui-test-utils": "8.2.2-snapshot.2+61e153c8a"
"@instructure/ui-babel-preset": "8.2.2-snapshot.3+e23eea66b",
"@instructure/ui-test-utils": "8.2.2-snapshot.3+e23eea66b"
},

@@ -52,3 +52,3 @@ "peerDependencies": {

"sideEffects": false,
"gitHead": "61e153c8a27c27ad850e59959a599b10b2c36b67"
"gitHead": "e23eea66baf5d9d79e3dba7136eb7534bb220021"
}
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