tailwind-variants 3.0.0 → 3.1.0
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/config.d.ts +3 -1
- package/dist/index.d.ts +5 -1
- package/dist/lite.d.ts +1 -0
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type {extendTailwindMerge} from "tailwind-merge";
|
|
|
3
3
|
type MergeConfig = Parameters<typeof extendTailwindMerge>[0];
|
|
4
4
|
type LegacyMergeConfig = Extract<MergeConfig, {extend?: unknown}>["extend"];
|
|
5
5
|
|
|
6
|
+
export type TWMergeConfig = MergeConfig & LegacyMergeConfig;
|
|
7
|
+
|
|
6
8
|
export type TWMConfig = {
|
|
7
9
|
/**
|
|
8
10
|
* Whether to merge the class names with `tailwind-merge` library.
|
|
@@ -15,7 +17,7 @@ export type TWMConfig = {
|
|
|
15
17
|
* The config object for `tailwind-merge` library.
|
|
16
18
|
* @see https://github.com/dcastil/tailwind-merge/blob/v2.2.0/docs/configuration.md
|
|
17
19
|
*/
|
|
18
|
-
twMergeConfig?:
|
|
20
|
+
twMergeConfig?: TWMergeConfig;
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export type TVConfig = TWMConfig;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {TVConfig, TWMConfig} from "./config";
|
|
1
|
+
import {TVConfig, TWMConfig, TWMergeConfig} from "./config";
|
|
2
2
|
import {CnOptions, CnReturn, TV} from "./types";
|
|
3
3
|
|
|
4
4
|
export * from "./types";
|
|
5
5
|
|
|
6
|
+
// util function
|
|
6
7
|
export declare const cnBase: <T extends CnOptions>(...classes: T) => CnReturn;
|
|
7
8
|
|
|
8
9
|
export declare const cn: <T extends CnOptions>(...classes: T) => (config?: TWMConfig) => CnReturn;
|
|
@@ -11,3 +12,6 @@ export declare const cn: <T extends CnOptions>(...classes: T) => (config?: TWMCo
|
|
|
11
12
|
export declare const tv: TV;
|
|
12
13
|
|
|
13
14
|
export declare function createTV(config: TVConfig): TV;
|
|
15
|
+
|
|
16
|
+
// types
|
|
17
|
+
export type {TVConfig, TWMConfig, TWMergeConfig};
|
package/dist/lite.d.ts
CHANGED