yummies 4.6.0 → 4.6.1
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/css.d.ts +21 -3
- package/css.d.ts.map +1 -1
- package/package.json +1 -1
package/css.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import clsx, { ClassValue } from 'clsx';
|
|
2
|
+
type ClassProp = {
|
|
3
|
+
class?: ClassValue;
|
|
4
|
+
className?: ClassValue;
|
|
5
|
+
};
|
|
6
|
+
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
3
7
|
/**
|
|
4
8
|
* Перевод значения в пикселях в rem строковое
|
|
5
9
|
*/
|
|
@@ -8,11 +12,25 @@ export declare const toRem: (px: number, remValue?: number) => string;
|
|
|
8
12
|
* classNames/clsx но с примесями tailwind-merge
|
|
9
13
|
*/
|
|
10
14
|
export declare const cx: (...args: Parameters<typeof clsx>) => string;
|
|
15
|
+
type ConfigSchema = Record<string, Record<string, ClassValue>>;
|
|
16
|
+
type ConfigVariants<T extends ConfigSchema> = {
|
|
17
|
+
[Variant in keyof T]?: StringToBoolean<keyof T[Variant]> | null | undefined;
|
|
18
|
+
};
|
|
19
|
+
type ConfigVariantsMulti<T extends ConfigSchema> = {
|
|
20
|
+
[Variant in keyof T]?: StringToBoolean<keyof T[Variant]> | StringToBoolean<keyof T[Variant]>[] | undefined;
|
|
21
|
+
};
|
|
22
|
+
type Config<T> = T extends ConfigSchema ? {
|
|
23
|
+
variants?: T;
|
|
24
|
+
defaultVariants?: ConfigVariants<T>;
|
|
25
|
+
compoundVariants?: (T extends ConfigSchema ? (ConfigVariants<T> | ConfigVariantsMulti<T>) & ClassProp : ClassProp)[];
|
|
26
|
+
} : never;
|
|
27
|
+
type Props<T> = T extends ConfigSchema ? ConfigVariants<T> & ClassProp : ClassProp;
|
|
11
28
|
/**
|
|
12
29
|
* Class Variance Authority но с примесями tailwind-merge
|
|
13
30
|
*
|
|
14
31
|
* https://cva.style/docs
|
|
15
32
|
*/
|
|
16
|
-
export declare const cva:
|
|
33
|
+
export declare const cva: <T>(base?: ClassValue, config?: Config<T>) => (props?: Props<T>) => string;
|
|
17
34
|
export type { VariantProps } from 'class-variance-authority';
|
|
35
|
+
export type { ClassValue } from 'clsx';
|
|
18
36
|
//# sourceMappingURL=css.d.ts.map
|
package/css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGxC,KAAK,SAAS,GAAG;IACf,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,EAAE,iBAAa,WAA0B,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,EAAE,GAAI,GAAG,MAAM,UAAU,CAAC,OAAO,IAAI,CAAC,WAA2B,CAAC;AAE/E,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAC/D,KAAK,cAAc,CAAC,CAAC,SAAS,YAAY,IAAI;KAC3C,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS;CAC5E,CAAC;AACF,KAAK,mBAAmB,CAAC,CAAC,SAAS,YAAY,IAAI;KAChD,OAAO,IAAI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