classed-components
Advanced tools
Comparing version 2.0.0 to 2.0.1
"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": { |
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
28472
+ Addedclsx@^2.1.0
+ Addedclsx@2.1.1(transitive)
- Removedclassnames@^2.3.1
- Removedclassnames@2.5.1(transitive)