@tw-classed/core
Advanced tools
Comparing version 1.2.5 to 1.3.0-canary.1
import { ClassedCoreFunctionType } from "./types"; | ||
declare const classed: ClassedCoreFunctionType; | ||
export { classed }; | ||
export interface ClassedCoreConfig { | ||
merger?: (...args: string[]) => any; | ||
} | ||
export interface CreateClassedCoreType { | ||
(config?: ClassedCoreConfig): { | ||
classed: ClassedCoreFunctionType; | ||
}; | ||
} | ||
export declare const createClassed: CreateClassedCoreType; | ||
export declare const classed: ClassedCoreFunctionType; |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.classed = void 0; | ||
exports.createClassed = exports.classed = void 0; | ||
@@ -15,3 +15,5 @@ var _parser = require("./parser"); | ||
const classed = (...classNames) => { | ||
const internalClassed = (classes, { | ||
merger = _classNames.mergeClass | ||
} = {}) => { | ||
const { | ||
@@ -22,3 +24,3 @@ className, | ||
compoundVariants | ||
} = (0, _parser.parseClassNames)(classNames); | ||
} = (0, _parser.parseClassNames)(classes); | ||
@@ -31,3 +33,3 @@ const producer = variantProps => { | ||
}, variantProps); | ||
return (0, _classNames.mergeClass)(className, variantClassName); | ||
return merger(className, variantClassName); | ||
}; | ||
@@ -44,2 +46,12 @@ | ||
const createClassed = config => { | ||
const classed2 = (...args) => internalClassed(args, config); | ||
return { | ||
classed: classed2 | ||
}; | ||
}; | ||
exports.createClassed = createClassed; | ||
const classed = createClassed().classed; | ||
exports.classed = classed; |
import { ClassedCoreFunctionType } from "./types"; | ||
declare const classed: ClassedCoreFunctionType; | ||
export { classed }; | ||
export interface ClassedCoreConfig { | ||
merger?: (...args: string[]) => any; | ||
} | ||
export interface CreateClassedCoreType { | ||
(config?: ClassedCoreConfig): { | ||
classed: ClassedCoreFunctionType; | ||
}; | ||
} | ||
export declare const createClassed: CreateClassedCoreType; | ||
export declare const classed: ClassedCoreFunctionType; |
{ | ||
"name": "@tw-classed/core", | ||
"version": "1.2.5", | ||
"version": "1.3.0-canary.1", | ||
"description": "A Stitches & Styled-Components inspired library to create reusable Tailwind react components", | ||
@@ -39,4 +39,4 @@ "sideEffects": false, | ||
"scripts": { | ||
"dev": "vite build --watch", | ||
"build": "rimraf ./dist && unbuild", | ||
"dev": "nodemon --watch './src/**/*' -e ts,tsx --exec 'pnpm run build'", | ||
"build": "unbuild", | ||
"test": "vitest run", | ||
@@ -43,0 +43,0 @@ "test:watch": "vitest", |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
26519
577
1