tailwind-variants 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +16 -7
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -214,9 +214,17 @@ export type TV = {
|
|
|
214
214
|
B extends ClassValue = undefined,
|
|
215
215
|
S extends TVSlots = undefined,
|
|
216
216
|
// @ts-expect-error
|
|
217
|
-
E extends TVReturnType =
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
E extends TVReturnType = TVReturnType<
|
|
218
|
+
V,
|
|
219
|
+
S,
|
|
220
|
+
B,
|
|
221
|
+
C,
|
|
222
|
+
// @ts-expect-error
|
|
223
|
+
EV extends undefined ? {} : EV,
|
|
224
|
+
// @ts-expect-error
|
|
225
|
+
ES extends undefined ? {} : ES
|
|
226
|
+
>,
|
|
227
|
+
EV extends TVVariants<ES, B, E["variants"], ES> = E["variants"],
|
|
220
228
|
ES extends TVSlots = E["slots"] extends TVSlots ? E["slots"] : undefined,
|
|
221
229
|
>(
|
|
222
230
|
options: {
|
|
@@ -267,7 +275,8 @@ export declare const tv: TV;
|
|
|
267
275
|
|
|
268
276
|
export declare const defaultConfig: TVConfig;
|
|
269
277
|
|
|
270
|
-
export type VariantProps<
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
278
|
+
export type VariantProps<T> = T extends {variants: infer V}
|
|
279
|
+
? V extends TVVariantsDefault<any, undefined>
|
|
280
|
+
? {[K in TVVariantKeys<V, any>[number]]?: keyof V[K]}
|
|
281
|
+
: never
|
|
282
|
+
: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwind-variants",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "🦄 Tailwindcss first-class variant API",
|
|
5
5
|
"author": "Junior Garcia <jrgarciadev@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"test": "jest --verbose"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"tailwind-merge": "^1.
|
|
38
|
+
"tailwind-merge": "^1.13.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@commitlint/cli": "^17.2.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"ts-node": "^10.9.1",
|
|
68
68
|
"tslib": "^2.4.1",
|
|
69
69
|
"tsup": "6.6.3",
|
|
70
|
-
"typescript": "
|
|
70
|
+
"typescript": "5.1.3",
|
|
71
71
|
"webpack": "^5.53.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|