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

@tw-classed/core

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tw-classed/core - npm Package Compare versions

Comparing version 1.4.0 to 1.4.4

21

dist/index.esm.js

@@ -33,3 +33,3 @@ /**

record.defaultVariants && Object.assign(defaultVariants, record.defaultVariants);
record.compoundVariants && compoundVariants.push(...record.compoundVariants);
record.compoundVariants && record.compoundVariants.forEach((cv)=>compoundVariants.push(cv));
record.className && stringClassNames.push(record.className);

@@ -74,10 +74,13 @@ record.base && stringClassNames.push(record.base);

function getCompoundVariantClasses({ props , defaultVariants }, compoundVariants = []) {
return compoundVariants == null ? void 0 : compoundVariants.reduce((acc, { class: cvClass , className: cvClassName , ...compoundVariantOptions })=>Object.entries(compoundVariantOptions).every(([key, value])=>({
...defaultVariants,
...props
})[key] === value) ? [
...acc,
cvClass,
cvClassName
] : acc, []);
return compoundVariants.reduce((acc, { class: cvClass , className: cvClassName , ...cvo })=>{
const notMatched = Object.entries(cvo).some(([key, value])=>{
const propValue = props[key];
return (propValue !== undefined ? propValue : defaultVariants == null ? void 0 : defaultVariants[key]) !== value;
});
if (!notMatched) {
if (cvClass) acc.push(cvClass);
if (cvClassName) acc.push(cvClassName);
}
return acc;
}, []);
}

@@ -84,0 +87,0 @@

{
"name": "@tw-classed/core",
"version": "1.4.0",
"version": "1.4.4",
"description": "A Stitches & Styled-Components inspired library to create reusable Tailwind react components",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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