@tw-classed/core
Advanced tools
Comparing version 1.2.2 to 1.2.3-canary.0
@@ -78,4 +78,6 @@ "use strict"; | ||
variantSelector = variantValue.toString(); | ||
} else if (typeof variantValue === "number") { | ||
variantSelector = variantValue.toString(); | ||
} else { | ||
variantSelector = defaultVariants?.[variantKey]; | ||
variantSelector = defaultVariants?.[variantKey]?.toString(); | ||
} | ||
@@ -82,0 +84,0 @@ |
@@ -27,3 +27,3 @@ import type * as Util from "./util"; | ||
export type InferVariantProps<V extends Variants | undefined = undefined> = V extends Variants ? Partial<{ | ||
[K in keyof V]: V[K] extends BooleanVariant ? boolean : keyof V[K] | undefined; | ||
[K in keyof V]: Util.Widen<keyof V[K]>; | ||
}> : {}; | ||
@@ -66,3 +66,3 @@ interface ClassedCreator<Props extends {} = {}> { | ||
defaultVariants?: "variants" extends keyof Composers[K] ? { | ||
[Name in keyof Composers[K]["variants"]]?: keyof Composers[K]["variants"][Name]; | ||
[Name in keyof Composers[K]["variants"]]?: Util.Widen<keyof Composers[K]["variants"][Name]>; | ||
} : never; | ||
@@ -69,0 +69,0 @@ compoundVariants?: (("variants" extends keyof Composers[K] ? { |
@@ -27,3 +27,3 @@ import type * as Util from "./util"; | ||
export type InferVariantProps<V extends Variants | undefined = undefined> = V extends Variants ? Partial<{ | ||
[K in keyof V]: V[K] extends BooleanVariant ? boolean : keyof V[K] | undefined; | ||
[K in keyof V]: Util.Widen<keyof V[K]>; | ||
}> : {}; | ||
@@ -66,3 +66,3 @@ interface ClassedCreator<Props extends {} = {}> { | ||
defaultVariants?: "variants" extends keyof Composers[K] ? { | ||
[Name in keyof Composers[K]["variants"]]?: keyof Composers[K]["variants"][Name]; | ||
[Name in keyof Composers[K]["variants"]]?: Util.Widen<keyof Composers[K]["variants"][Name]>; | ||
} : never; | ||
@@ -69,0 +69,0 @@ compoundVariants?: (("variants" extends keyof Composers[K] ? { |
{ | ||
"name": "@tw-classed/core", | ||
"version": "1.2.2", | ||
"version": "1.2.3-canary.0", | ||
"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
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
25099
596
1