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

classed-components

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classed-components - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

dist/classNames.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.processClasses = void 0;
const classnames_1 = require("classnames");
const clsx_1 = require("clsx");
const isTemplateString = (classes) => (Array.isArray(classes) && Object.prototype.hasOwnProperty.call(classes, 'raw'));

@@ -20,3 +20,3 @@ const processClasses = (classes, props, templateStringPlaceholders = []) => {

exports.processClasses = processClasses;
const preparePlaceholders = (templateStringPlaceholders, props) => (templateStringPlaceholders.map((placeholder) => (0, classnames_1.default)((0, exports.processClasses)(placeholder, props))));
const preparePlaceholders = (templateStringPlaceholders, props) => (templateStringPlaceholders.map((placeholder) => (0, clsx_1.clsx)((0, exports.processClasses)(placeholder, props))));
const compileClassnames = (placeholders, classes) => {

@@ -23,0 +23,0 @@ const className = placeholders.reduce((acc, placeholder, i) => acc + classes[i] + placeholder, '');

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.classed = void 0;
const classnames_1 = require("classnames");
const clsx_1 = require("clsx");
const react_1 = require("react");

@@ -11,3 +11,3 @@ const classNames_1 = require("./classNames");

const Hoc = (0, react_1.forwardRef)((props, ref) => {
const className = (0, classnames_1.default)((0, classNames_1.processClasses)(classes, props, placeholders), props.className);
const className = (0, clsx_1.clsx)((0, classNames_1.processClasses)(classes, props, placeholders), props.className);
const propsToForward = (0, tags_1.filterPropsToForward)(tag, props);

@@ -14,0 +14,0 @@ return (0, react_1.createElement)(tag, Object.assign(Object.assign({}, propsToForward), { ref, className }));

{
"name": "classed-components",
"version": "2.0.0",
"version": "2.0.1",
"description": "CSS Classes for the component age. Apply your Css with the power of Javascript.",

@@ -57,4 +57,4 @@ "keywords": [

"dependencies": {
"@emotion/is-prop-valid": "^1.1.0",
"classnames": "^2.3.1"
"@emotion/is-prop-valid": "^1.2.1",
"clsx": "^2.1.0"
},

@@ -61,0 +61,0 @@ "peerDependencies": {

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