New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zohodesk/theme

Package Overview
Dependencies
Maintainers
31
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zohodesk/theme - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

3

es/ThemeContext.js
import React from 'react';
const ThemeContext = /*#__PURE__*/React.createContext(null);
if (process.env.NODE_ENV !== 'production') {
ThemeContext.displayName = 'ThemeContext';
}
export default ThemeContext;
export default ThemeContext;
/* Color contact ally */

@@ -10,0 +9,0 @@

@@ -6,2 +6,3 @@ import React, { useMemo } from 'react';

import defaultProps from './props/defaultProps';
/**

@@ -12,3 +13,2 @@ * To used to customized css variables and component default props - components used under this provider.

*/
export default function ThemeProvider(props) {

@@ -15,0 +15,0 @@ const {

@@ -7,8 +7,6 @@ import { useContext } from "react";

} = useContext(ThemeContext);
if (Array.isArray(components)) {
return components.map(component => componentRegistry[component]);
}
return componentRegistry[components];
}
import { useContext } from 'react';
import selectn from 'selectn';
import ThemeContext from './ThemeContext';
const useThemeByComponent = componentName => {

@@ -9,3 +8,2 @@ const themeContextValue = useContext(ThemeContext);

};
export default useThemeByComponent;

@@ -5,2 +5,3 @@ // export default function combineConfigurations(...configurations) {

// let doneList = [];
import flatVariables from './flatVariables';

@@ -12,3 +13,2 @@ /**

*/
export default function combineConfigurations(configurations) {

@@ -24,3 +24,2 @@ const configs = configurations.map(configuration => ({

}
Object.assign(res[next.library].variables, next.variables);

@@ -30,8 +29,12 @@ return res;

return Object.keys(mergeObject).map(key => mergeObject[key]);
} // configurations.forEach((config, index) => {
}
// configurations.forEach((config, index) => {
// if (!config || doneList.includes(config.library)) {
// return;
// }
// let remainingList = configurations.slice(index);
// let newConfiguration = config;
// remainingList.forEach((config2) => {

@@ -48,6 +51,8 @@ // if (config2 && config.library === config2.library) {

// });
// doneList.push(config.library);
// resultConfiguration.push(newConfiguration);
// });
// return resultConfiguration;
// }

@@ -26,5 +26,4 @@ /**

}
return res;
}, {})), {});
}

@@ -21,3 +21,2 @@ import combineConfigurations from './combineConfigurations';

*/
export default function getCustomizedCssVariables(cssVariableConfigs) {

@@ -24,0 +23,0 @@ let prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '--lib_';

import { colorSchemes, autoSystemMode } from './themeConstants';
export default (appMode => {
const matched = window.matchMedia('(prefers-color-scheme: dark)').matches;
if (appMode === autoSystemMode) {
return matched ? colorSchemes.dark : colorSchemes.light;
}
return appMode;
});

@@ -8,12 +8,10 @@ import React from "react";

}
if (!componentName) {
throw new Error("The prop componentName shouldn't be empty.");
}
const WrapperComponent = component;
function BaseComponent(props) {
const themeProps = useThemeByComponentProps(componentName);
const themedProps = { ...component.defaultProps,
const themedProps = {
...component.defaultProps,
...themeProps,

@@ -24,4 +22,3 @@ ...props

}
return hoistStatics(WrapperComponent, BaseComponent);
}
{
"name": "@zohodesk/theme",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

@@ -24,3 +24,3 @@ "private": false,

"license": "ISC",
"gitHead": "e57c562c44c9b82f9e2fa2df1e3c97d106efb72d"
"gitHead": "cc656e6d4c2249ad79916757b2a96828b678245b"
}
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