Skip to content

Commit 73ced43

Browse files
author
nafees nazik
committed
fix: export types
1 parent 89baa00 commit 73ced43

File tree

4 files changed

+14
-32
lines changed

4 files changed

+14
-32
lines changed

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@egoist/prettier-config": "1.0.0",
2828
"@milahu/patch-package-with-pnpm-support": "^6.4.8",
2929
"@types/react": "^17.0.40",
30+
"class-variance-authority": "^0.1.0",
3031
"prettier": "2.5.1",
3132
"react": "^17.0.2",
3233
"tsup": "5.12.1",
@@ -35,8 +36,5 @@
3536
},
3637
"peerDependencies": {
3738
"react": ">= 16.3.0"
38-
},
39-
"dependencies": {
40-
"class-variance-authority": "^0.1.0"
4139
}
4240
}
Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# generated by patch-package 6.4.8 on 2022-03-16 11:48:36
1+
# generated by patch-package 6.4.8 on 2022-03-19 13:04:40
22
#
33
# command:
44
# npx patch-package class-variance-authority
@@ -7,28 +7,12 @@
77
# class-variance-authority: 0.1.0
88
#
99
diff --git a/node_modules/class-variance-authority/dist/index.d.ts b/node_modules/class-variance-authority/dist/index.d.ts
10-
index 5f2b154..e0288c9 100644
10+
index 5f2b154..e29ad94 100644
1111
--- a/node_modules/class-variance-authority/dist/index.d.ts
1212
+++ b/node_modules/class-variance-authority/dist/index.d.ts
13-
@@ -1,15 +1,15 @@
14-
-declare type ClassValue = string | null | undefined | ClassValue[];
15-
-declare type OmitUndefined<T> = T extends undefined ? never : T;
16-
-declare type StringToBoolean<T> = T extends "true" ? true : T extends "false" ? false : T;
17-
+export declare type ClassValue = string | null | undefined | ClassValue[];
18-
+export declare type OmitUndefined<T> = T extends undefined ? never : T;
19-
+export declare type StringToBoolean<T> = T extends "true" ? true : T extends "false" ? false : T;
20-
export declare type VariantProps<Component extends (...args: any) => any> = OmitUndefined<Parameters<Component>[0]>;
21-
export declare type CxOptions = ClassValue[];
22-
export declare type CxReturn = string;
23-
export declare const cx: <T extends CxOptions>(...classes: T) => CxReturn;
24-
-interface ClassProp {
25-
+export interface ClassProp {
26-
class?: ClassValue;
27-
}
28-
-declare type VariantsSchema = Record<string, Record<string, ClassValue>>;
29-
-declare type VariantsConfig<Variants extends VariantsSchema> = {
30-
+export declare type VariantsSchema = Record<string, Record<string, ClassValue>>;
31-
+export declare type VariantsConfig<Variants extends VariantsSchema> = {
32-
[Variant in keyof Variants]?: StringToBoolean<keyof Variants[Variant]>;
33-
};
34-
export declare const cva: <Variants>(base?: ClassValue, config?: (Variants extends VariantsSchema ? {
13+
@@ -17,4 +17,4 @@ export declare const cva: <Variants>(base?: ClassValue, config?: (Variants exten
14+
defaultVariants?: VariantsConfig<Variants> | undefined;
15+
compoundVariants?: (Variants extends VariantsSchema ? VariantsConfig<Variants> & ClassProp : ClassProp)[] | undefined;
16+
} : never) | undefined) => (props?: (Variants extends VariantsSchema ? VariantsConfig<Variants> & ClassProp : ClassProp) | undefined) => string;
17+
-export {};
18+
+export {VariantsSchema,VariantsConfig,StringToBoolean,ClassProp,ClassValue,OmitUndefined};

pnpm-lock.yaml

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ import * as React from "react"
22
import { cva, cx } from "class-variance-authority"
33
import type {
44
VariantProps,
5-
ClassValue,
65
ClassProp,
76
VariantsSchema,
87
VariantsConfig,
8+
ClassValue,
99
} from "class-variance-authority"
1010

11+
export { VariantProps, ClassProp, VariantsSchema, VariantsConfig, ClassValue }
12+
1113
export type IntrinsicElementsKeys = keyof JSX.IntrinsicElements
1214

1315
type VariantOBJ<Variants> =

0 commit comments

Comments
 (0)