praxis-kit 2.0.1 → 2.0.2
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/contract/index.d.ts +12 -9
- package/dist/lit/index.d.ts +12 -9
- package/dist/{merge-refs-DxjWMq3U.d.ts → merge-refs-tA18zYP6.d.ts} +12 -5
- package/dist/preact/index.d.ts +12 -5
- package/dist/react/index.d.ts +2 -2
- package/dist/react/legacy.d.ts +2 -2
- package/dist/solid/index.d.ts +12 -5
- package/dist/svelte/index.d.ts +13 -10
- package/dist/vue/index.d.ts +12 -5
- package/dist/web/index.d.ts +12 -9
- package/package.json +3 -3
package/dist/contract/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ type KnownAriaRole = (typeof KNOWN_ARIA_ROLES)[number];
|
|
|
11
11
|
|
|
12
12
|
type AriaRole = KnownAriaRole | (string & {});
|
|
13
13
|
|
|
14
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
15
|
+
|
|
14
16
|
type ClassName = string | string[];
|
|
15
17
|
|
|
16
18
|
type EmptyRecord = Record<never, never>;
|
|
@@ -21,6 +23,10 @@ type IntrinsicProps = AnyRecord & {
|
|
|
21
23
|
|
|
22
24
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
23
25
|
|
|
26
|
+
type Numberish = number | `${number}`;
|
|
27
|
+
|
|
28
|
+
type Primitive = string | number | boolean;
|
|
29
|
+
|
|
24
30
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
25
31
|
|
|
26
32
|
type StrictMode = boolean | 'warn' | 'async-warn' | 'throw';
|
|
@@ -53,9 +59,9 @@ type ValidResult = {
|
|
|
53
59
|
|
|
54
60
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
55
61
|
|
|
56
|
-
type VariantValue = string | string[];
|
|
62
|
+
type VariantValue$1 = string | string[];
|
|
57
63
|
|
|
58
|
-
type VariantStates<K extends string = string> = Record<K, VariantValue>;
|
|
64
|
+
type VariantStates<K extends string = string> = Record<K, VariantValue$1>;
|
|
59
65
|
|
|
60
66
|
type VariantMap<V extends string = string, K extends string = string> = Record<V, VariantStates<K>>;
|
|
61
67
|
|
|
@@ -69,19 +75,16 @@ type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
|
69
75
|
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
70
76
|
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
71
77
|
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
72
|
-
class: VariantValue;
|
|
78
|
+
class: VariantValue$1;
|
|
73
79
|
};
|
|
74
80
|
|
|
75
81
|
interface CVACompounds<V extends VariantMap> {
|
|
76
82
|
compoundVariants?: readonly CompoundVariant<V>[];
|
|
77
83
|
}
|
|
78
84
|
|
|
79
|
-
|
|
80
|
-
type VariantProps<V extends VariantMap> = {
|
|
81
|
-
[K in keyof V]?: VariantKey<V, K>;
|
|
82
|
-
};
|
|
85
|
+
type VariantValue<K extends string> = string extends K ? Primitive : K extends 'true' | 'false' ? Booleanish : K extends `${number}` ? Numberish : K;
|
|
83
86
|
type DefaultVariants<V extends VariantMap> = {
|
|
84
|
-
[K in keyof V]?:
|
|
87
|
+
[K in keyof V]?: VariantValue<keyof V[K] & string>;
|
|
85
88
|
};
|
|
86
89
|
|
|
87
90
|
interface CVADefaults<V extends VariantMap> {
|
|
@@ -204,7 +207,7 @@ type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
|
204
207
|
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends PresetMap<V> = Readonly<EmptyRecord>, TPluginProps extends AnyRecord = EmptyRecord> = {
|
|
205
208
|
readonly base?: ClassName;
|
|
206
209
|
readonly variants?: V;
|
|
207
|
-
readonly defaults?: Partial<
|
|
210
|
+
readonly defaults?: Partial<DefaultVariants<V>>;
|
|
208
211
|
readonly compounds?: readonly CompoundVariant<V>[];
|
|
209
212
|
readonly presets?: TPreset;
|
|
210
213
|
readonly tags?: Readonly<TagMap>;
|
package/dist/lit/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ type KnownAriaRole = (typeof KNOWN_ARIA_ROLES)[number];
|
|
|
12
12
|
|
|
13
13
|
type AriaRole = KnownAriaRole | (string & {});
|
|
14
14
|
|
|
15
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
16
|
+
|
|
15
17
|
type ClassName = string | string[];
|
|
16
18
|
|
|
17
19
|
type EmptyRecord = Record<never, never>;
|
|
@@ -22,6 +24,10 @@ type IntrinsicProps = AnyRecord & {
|
|
|
22
24
|
|
|
23
25
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
24
26
|
|
|
27
|
+
type Numberish = number | `${number}`;
|
|
28
|
+
|
|
29
|
+
type Primitive = string | number | boolean;
|
|
30
|
+
|
|
25
31
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
26
32
|
|
|
27
33
|
type StrictMode = boolean | 'warn' | 'async-warn' | 'throw';
|
|
@@ -54,9 +60,9 @@ type ValidResult = {
|
|
|
54
60
|
|
|
55
61
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
56
62
|
|
|
57
|
-
type VariantValue = string | string[];
|
|
63
|
+
type VariantValue$1 = string | string[];
|
|
58
64
|
|
|
59
|
-
type VariantStates<K extends string = string> = Record<K, VariantValue>;
|
|
65
|
+
type VariantStates<K extends string = string> = Record<K, VariantValue$1>;
|
|
60
66
|
|
|
61
67
|
type VariantMap<V extends string = string, K extends string = string> = Record<V, VariantStates<K>>;
|
|
62
68
|
|
|
@@ -70,19 +76,16 @@ type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
|
70
76
|
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
71
77
|
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
72
78
|
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
73
|
-
class: VariantValue;
|
|
79
|
+
class: VariantValue$1;
|
|
74
80
|
};
|
|
75
81
|
|
|
76
82
|
interface CVACompounds<V extends VariantMap> {
|
|
77
83
|
compoundVariants?: readonly CompoundVariant<V>[];
|
|
78
84
|
}
|
|
79
85
|
|
|
80
|
-
|
|
81
|
-
type VariantProps<V extends VariantMap> = {
|
|
82
|
-
[K in keyof V]?: VariantKey<V, K>;
|
|
83
|
-
};
|
|
86
|
+
type VariantValue<K extends string> = string extends K ? Primitive : K extends 'true' | 'false' ? Booleanish : K extends `${number}` ? Numberish : K;
|
|
84
87
|
type DefaultVariants<V extends VariantMap> = {
|
|
85
|
-
[K in keyof V]?:
|
|
88
|
+
[K in keyof V]?: VariantValue<keyof V[K] & string>;
|
|
86
89
|
};
|
|
87
90
|
|
|
88
91
|
interface CVADefaults<V extends VariantMap> {
|
|
@@ -205,7 +208,7 @@ type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
|
205
208
|
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends PresetMap<V> = Readonly<EmptyRecord>, TPluginProps extends AnyRecord = EmptyRecord> = {
|
|
206
209
|
readonly base?: ClassName;
|
|
207
210
|
readonly variants?: V;
|
|
208
|
-
readonly defaults?: Partial<
|
|
211
|
+
readonly defaults?: Partial<DefaultVariants<V>>;
|
|
209
212
|
readonly compounds?: readonly CompoundVariant<V>[];
|
|
210
213
|
readonly presets?: TPreset;
|
|
211
214
|
readonly tags?: Readonly<TagMap>;
|
|
@@ -12,6 +12,8 @@ type KnownAriaRole = (typeof KNOWN_ARIA_ROLES)[number];
|
|
|
12
12
|
|
|
13
13
|
type AriaRole = KnownAriaRole | (string & {});
|
|
14
14
|
|
|
15
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
16
|
+
|
|
15
17
|
type ClassName = string | string[];
|
|
16
18
|
|
|
17
19
|
type EmptyRecord = Record<never, never>;
|
|
@@ -22,6 +24,10 @@ type IntrinsicProps = AnyRecord & {
|
|
|
22
24
|
|
|
23
25
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
24
26
|
|
|
27
|
+
type Numberish = number | `${number}`;
|
|
28
|
+
|
|
29
|
+
type Primitive = string | number | boolean;
|
|
30
|
+
|
|
25
31
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
26
32
|
|
|
27
33
|
type StrictMode = boolean | 'warn' | 'async-warn' | 'throw';
|
|
@@ -54,9 +60,9 @@ type ValidResult = {
|
|
|
54
60
|
|
|
55
61
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
56
62
|
|
|
57
|
-
type VariantValue = string | string[];
|
|
63
|
+
type VariantValue$1 = string | string[];
|
|
58
64
|
|
|
59
|
-
type VariantStates<K extends string = string> = Record<K, VariantValue>;
|
|
65
|
+
type VariantStates<K extends string = string> = Record<K, VariantValue$1>;
|
|
60
66
|
|
|
61
67
|
type VariantMap<V extends string = string, K extends string = string> = Record<V, VariantStates<K>>;
|
|
62
68
|
|
|
@@ -70,7 +76,7 @@ type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
|
70
76
|
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
71
77
|
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
72
78
|
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
73
|
-
class: VariantValue;
|
|
79
|
+
class: VariantValue$1;
|
|
74
80
|
};
|
|
75
81
|
|
|
76
82
|
interface CVACompounds<V extends VariantMap> {
|
|
@@ -81,8 +87,9 @@ interface CVACompounds<V extends VariantMap> {
|
|
|
81
87
|
type VariantProps<V extends VariantMap> = {
|
|
82
88
|
[K in keyof V]?: VariantKey<V, K>;
|
|
83
89
|
};
|
|
90
|
+
type VariantValue<K extends string> = string extends K ? Primitive : K extends 'true' | 'false' ? Booleanish : K extends `${number}` ? Numberish : K;
|
|
84
91
|
type DefaultVariants<V extends VariantMap> = {
|
|
85
|
-
[K in keyof V]?:
|
|
92
|
+
[K in keyof V]?: VariantValue<keyof V[K] & string>;
|
|
86
93
|
};
|
|
87
94
|
|
|
88
95
|
interface CVADefaults<V extends VariantMap> {
|
|
@@ -216,7 +223,7 @@ type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
|
216
223
|
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends PresetMap<V> = Readonly<EmptyRecord>, TPluginProps extends AnyRecord = EmptyRecord> = {
|
|
217
224
|
readonly base?: ClassName;
|
|
218
225
|
readonly variants?: V;
|
|
219
|
-
readonly defaults?: Partial<
|
|
226
|
+
readonly defaults?: Partial<DefaultVariants<V>>;
|
|
220
227
|
readonly compounds?: readonly CompoundVariant<V>[];
|
|
221
228
|
readonly presets?: TPreset;
|
|
222
229
|
readonly tags?: Readonly<TagMap>;
|
package/dist/preact/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ type KnownAriaRole = (typeof KNOWN_ARIA_ROLES)[number];
|
|
|
12
12
|
|
|
13
13
|
type AriaRole = KnownAriaRole | (string & {});
|
|
14
14
|
|
|
15
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
16
|
+
|
|
15
17
|
type ClassName = string | string[];
|
|
16
18
|
|
|
17
19
|
type EmptyRecord = Record<never, never>;
|
|
@@ -22,6 +24,10 @@ type IntrinsicProps = AnyRecord & {
|
|
|
22
24
|
|
|
23
25
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
24
26
|
|
|
27
|
+
type Numberish = number | `${number}`;
|
|
28
|
+
|
|
29
|
+
type Primitive = string | number | boolean;
|
|
30
|
+
|
|
25
31
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
26
32
|
|
|
27
33
|
type StrictMode = boolean | 'warn' | 'async-warn' | 'throw';
|
|
@@ -54,9 +60,9 @@ type ValidResult = {
|
|
|
54
60
|
|
|
55
61
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
56
62
|
|
|
57
|
-
type VariantValue = string | string[];
|
|
63
|
+
type VariantValue$1 = string | string[];
|
|
58
64
|
|
|
59
|
-
type VariantStates<K extends string = string> = Record<K, VariantValue>;
|
|
65
|
+
type VariantStates<K extends string = string> = Record<K, VariantValue$1>;
|
|
60
66
|
|
|
61
67
|
type VariantMap<V extends string = string, K extends string = string> = Record<V, VariantStates<K>>;
|
|
62
68
|
|
|
@@ -70,7 +76,7 @@ type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
|
70
76
|
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
71
77
|
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
72
78
|
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
73
|
-
class: VariantValue;
|
|
79
|
+
class: VariantValue$1;
|
|
74
80
|
};
|
|
75
81
|
|
|
76
82
|
interface CVACompounds<V extends VariantMap> {
|
|
@@ -81,8 +87,9 @@ interface CVACompounds<V extends VariantMap> {
|
|
|
81
87
|
type VariantProps<V extends VariantMap> = {
|
|
82
88
|
[K in keyof V]?: VariantKey<V, K>;
|
|
83
89
|
};
|
|
90
|
+
type VariantValue<K extends string> = string extends K ? Primitive : K extends 'true' | 'false' ? Booleanish : K extends `${number}` ? Numberish : K;
|
|
84
91
|
type DefaultVariants<V extends VariantMap> = {
|
|
85
|
-
[K in keyof V]?:
|
|
92
|
+
[K in keyof V]?: VariantValue<keyof V[K] & string>;
|
|
86
93
|
};
|
|
87
94
|
|
|
88
95
|
interface CVADefaults<V extends VariantMap> {
|
|
@@ -215,7 +222,7 @@ type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
|
215
222
|
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends PresetMap<V> = Readonly<EmptyRecord>, TPluginProps extends AnyRecord = EmptyRecord> = {
|
|
216
223
|
readonly base?: ClassName;
|
|
217
224
|
readonly variants?: V;
|
|
218
|
-
readonly defaults?: Partial<
|
|
225
|
+
readonly defaults?: Partial<DefaultVariants<V>>;
|
|
219
226
|
readonly compounds?: readonly CompoundVariant<V>[];
|
|
220
227
|
readonly presets?: TPreset;
|
|
221
228
|
readonly tags?: Readonly<TagMap>;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ElementType, U as UnknownProps, V as VariantMap, P as PresetMap, a as EmptyRecord, A as AnyRecord, R as ReactFactoryOptions, b as PolymorphicComponent, c as PolymorphicGenerics, F as FactoryOptions } from '../merge-refs-
|
|
2
|
-
export { d as AnyFactoryOptions, e as ElementRef, f as PolymorphicProps, g as PolymorphicWithAsChild, h as PolymorphicWithRender, i as RenderCallbackProps, S as Slottable, j as SlottableProps, m as mergeRefs } from '../merge-refs-
|
|
1
|
+
import { E as ElementType, U as UnknownProps, V as VariantMap, P as PresetMap, a as EmptyRecord, A as AnyRecord, R as ReactFactoryOptions, b as PolymorphicComponent, c as PolymorphicGenerics, F as FactoryOptions } from '../merge-refs-tA18zYP6.js';
|
|
2
|
+
export { d as AnyFactoryOptions, e as ElementRef, f as PolymorphicProps, g as PolymorphicWithAsChild, h as PolymorphicWithRender, i as RenderCallbackProps, S as Slottable, j as SlottableProps, m as mergeRefs } from '../merge-refs-tA18zYP6.js';
|
|
3
3
|
import { Ref, ReactElement } from 'react';
|
|
4
4
|
import 'type-fest';
|
|
5
5
|
|
package/dist/react/legacy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ElementType, U as UnknownProps, V as VariantMap, P as PresetMap, a as EmptyRecord, A as AnyRecord, R as ReactFactoryOptions, b as PolymorphicComponent, c as PolymorphicGenerics } from '../merge-refs-
|
|
2
|
-
export { d as AnyFactoryOptions, e as ElementRef, F as FactoryOptions, f as PolymorphicProps, g as PolymorphicWithAsChild, h as PolymorphicWithRender, i as RenderCallbackProps, S as Slottable, j as SlottableProps, m as mergeRefs } from '../merge-refs-
|
|
1
|
+
import { E as ElementType, U as UnknownProps, V as VariantMap, P as PresetMap, a as EmptyRecord, A as AnyRecord, R as ReactFactoryOptions, b as PolymorphicComponent, c as PolymorphicGenerics } from '../merge-refs-tA18zYP6.js';
|
|
2
|
+
export { d as AnyFactoryOptions, e as ElementRef, F as FactoryOptions, f as PolymorphicProps, g as PolymorphicWithAsChild, h as PolymorphicWithRender, i as RenderCallbackProps, S as Slottable, j as SlottableProps, m as mergeRefs } from '../merge-refs-tA18zYP6.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import 'type-fest';
|
|
5
5
|
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ type KnownAriaRole = (typeof KNOWN_ARIA_ROLES)[number];
|
|
|
12
12
|
|
|
13
13
|
type AriaRole = KnownAriaRole | (string & {});
|
|
14
14
|
|
|
15
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
16
|
+
|
|
15
17
|
type ClassName = string | string[];
|
|
16
18
|
|
|
17
19
|
type EmptyRecord = Record<never, never>;
|
|
@@ -22,6 +24,10 @@ type IntrinsicProps = AnyRecord & {
|
|
|
22
24
|
|
|
23
25
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
24
26
|
|
|
27
|
+
type Numberish = number | `${number}`;
|
|
28
|
+
|
|
29
|
+
type Primitive = string | number | boolean;
|
|
30
|
+
|
|
25
31
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
26
32
|
|
|
27
33
|
type StrictMode = boolean | 'warn' | 'async-warn' | 'throw';
|
|
@@ -54,9 +60,9 @@ type ValidResult = {
|
|
|
54
60
|
|
|
55
61
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
56
62
|
|
|
57
|
-
type VariantValue = string | string[];
|
|
63
|
+
type VariantValue$1 = string | string[];
|
|
58
64
|
|
|
59
|
-
type VariantStates<K extends string = string> = Record<K, VariantValue>;
|
|
65
|
+
type VariantStates<K extends string = string> = Record<K, VariantValue$1>;
|
|
60
66
|
|
|
61
67
|
type VariantMap<V extends string = string, K extends string = string> = Record<V, VariantStates<K>>;
|
|
62
68
|
|
|
@@ -70,7 +76,7 @@ type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
|
70
76
|
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
71
77
|
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
72
78
|
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
73
|
-
class: VariantValue;
|
|
79
|
+
class: VariantValue$1;
|
|
74
80
|
};
|
|
75
81
|
|
|
76
82
|
interface CVACompounds<V extends VariantMap> {
|
|
@@ -81,8 +87,9 @@ interface CVACompounds<V extends VariantMap> {
|
|
|
81
87
|
type VariantProps<V extends VariantMap> = {
|
|
82
88
|
[K in keyof V]?: VariantKey<V, K>;
|
|
83
89
|
};
|
|
90
|
+
type VariantValue<K extends string> = string extends K ? Primitive : K extends 'true' | 'false' ? Booleanish : K extends `${number}` ? Numberish : K;
|
|
84
91
|
type DefaultVariants<V extends VariantMap> = {
|
|
85
|
-
[K in keyof V]?:
|
|
92
|
+
[K in keyof V]?: VariantValue<keyof V[K] & string>;
|
|
86
93
|
};
|
|
87
94
|
|
|
88
95
|
interface CVADefaults<V extends VariantMap> {
|
|
@@ -215,7 +222,7 @@ type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
|
215
222
|
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends PresetMap<V> = Readonly<EmptyRecord>, TPluginProps extends AnyRecord = EmptyRecord> = {
|
|
216
223
|
readonly base?: ClassName;
|
|
217
224
|
readonly variants?: V;
|
|
218
|
-
readonly defaults?: Partial<
|
|
225
|
+
readonly defaults?: Partial<DefaultVariants<V>>;
|
|
219
226
|
readonly compounds?: readonly CompoundVariant<V>[];
|
|
220
227
|
readonly presets?: TPreset;
|
|
221
228
|
readonly tags?: Readonly<TagMap>;
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ type KnownAriaRole = (typeof KNOWN_ARIA_ROLES)[number];
|
|
|
11
11
|
|
|
12
12
|
type AriaRole = KnownAriaRole | (string & {});
|
|
13
13
|
|
|
14
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
15
|
+
|
|
14
16
|
type ClassName = string | string[];
|
|
15
17
|
|
|
16
18
|
type EmptyRecord = Record<never, never>;
|
|
@@ -21,6 +23,10 @@ type IntrinsicProps = AnyRecord & {
|
|
|
21
23
|
|
|
22
24
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
23
25
|
|
|
26
|
+
type Numberish = number | `${number}`;
|
|
27
|
+
|
|
28
|
+
type Primitive = string | number | boolean;
|
|
29
|
+
|
|
24
30
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
25
31
|
|
|
26
32
|
type StrictMode = boolean | 'warn' | 'async-warn' | 'throw';
|
|
@@ -59,9 +65,9 @@ type ValidResult = {
|
|
|
59
65
|
|
|
60
66
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
61
67
|
|
|
62
|
-
type VariantValue = string | string[];
|
|
68
|
+
type VariantValue$1 = string | string[];
|
|
63
69
|
|
|
64
|
-
type VariantStates<K extends string = string> = Record<K, VariantValue>;
|
|
70
|
+
type VariantStates<K extends string = string> = Record<K, VariantValue$1>;
|
|
65
71
|
|
|
66
72
|
type VariantMap<V extends string = string, K extends string = string> = Record<V, VariantStates<K>>;
|
|
67
73
|
|
|
@@ -75,19 +81,16 @@ type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
|
75
81
|
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
76
82
|
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
77
83
|
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
78
|
-
class: VariantValue;
|
|
84
|
+
class: VariantValue$1;
|
|
79
85
|
};
|
|
80
86
|
|
|
81
87
|
interface CVACompounds<V extends VariantMap> {
|
|
82
88
|
compoundVariants?: readonly CompoundVariant<V>[];
|
|
83
89
|
}
|
|
84
90
|
|
|
85
|
-
|
|
86
|
-
type VariantProps<V extends VariantMap> = {
|
|
87
|
-
[K in keyof V]?: VariantKey<V, K>;
|
|
88
|
-
};
|
|
91
|
+
type VariantValue<K extends string> = string extends K ? Primitive : K extends 'true' | 'false' ? Booleanish : K extends `${number}` ? Numberish : K;
|
|
89
92
|
type DefaultVariants<V extends VariantMap> = {
|
|
90
|
-
[K in keyof V]?:
|
|
93
|
+
[K in keyof V]?: VariantValue<keyof V[K] & string>;
|
|
91
94
|
};
|
|
92
95
|
|
|
93
96
|
interface CVADefaults<V extends VariantMap> {
|
|
@@ -218,7 +221,7 @@ type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
|
218
221
|
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends PresetMap<V> = Readonly<EmptyRecord>, TPluginProps extends AnyRecord = EmptyRecord> = {
|
|
219
222
|
readonly base?: ClassName;
|
|
220
223
|
readonly variants?: V;
|
|
221
|
-
readonly defaults?: Partial<
|
|
224
|
+
readonly defaults?: Partial<DefaultVariants<V>>;
|
|
222
225
|
readonly compounds?: readonly CompoundVariant<V>[];
|
|
223
226
|
readonly presets?: TPreset;
|
|
224
227
|
readonly tags?: Readonly<TagMap>;
|
|
@@ -246,7 +249,7 @@ type ResolvedFactoryOptions<TDefault extends ElementType = ElementType, Props ex
|
|
|
246
249
|
readonly tagMap?: Readonly<TagMap>;
|
|
247
250
|
readonly presetMap?: TPreset;
|
|
248
251
|
readonly variants?: V;
|
|
249
|
-
readonly defaultVariants?: Partial<
|
|
252
|
+
readonly defaultVariants?: Partial<DefaultVariants<V>>;
|
|
250
253
|
readonly compoundVariants?: readonly CompoundVariant<V>[];
|
|
251
254
|
readonly displayName?: string;
|
|
252
255
|
readonly strict: StrictMode;
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ type KnownAriaRole = (typeof KNOWN_ARIA_ROLES)[number];
|
|
|
13
13
|
|
|
14
14
|
type AriaRole = KnownAriaRole | (string & {});
|
|
15
15
|
|
|
16
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
17
|
+
|
|
16
18
|
type ClassName = string | string[];
|
|
17
19
|
|
|
18
20
|
type EmptyRecord = Record<never, never>;
|
|
@@ -23,6 +25,10 @@ type IntrinsicProps = AnyRecord & {
|
|
|
23
25
|
|
|
24
26
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
25
27
|
|
|
28
|
+
type Numberish = number | `${number}`;
|
|
29
|
+
|
|
30
|
+
type Primitive = string | number | boolean;
|
|
31
|
+
|
|
26
32
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
27
33
|
|
|
28
34
|
type StrictMode = boolean | 'warn' | 'async-warn' | 'throw';
|
|
@@ -55,9 +61,9 @@ type ValidResult = {
|
|
|
55
61
|
|
|
56
62
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
57
63
|
|
|
58
|
-
type VariantValue = string | string[];
|
|
64
|
+
type VariantValue$1 = string | string[];
|
|
59
65
|
|
|
60
|
-
type VariantStates<K extends string = string> = Record<K, VariantValue>;
|
|
66
|
+
type VariantStates<K extends string = string> = Record<K, VariantValue$1>;
|
|
61
67
|
|
|
62
68
|
type VariantMap<V extends string = string, K extends string = string> = Record<V, VariantStates<K>>;
|
|
63
69
|
|
|
@@ -71,7 +77,7 @@ type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
|
71
77
|
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
72
78
|
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
73
79
|
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
74
|
-
class: VariantValue;
|
|
80
|
+
class: VariantValue$1;
|
|
75
81
|
};
|
|
76
82
|
|
|
77
83
|
interface CVACompounds<V extends VariantMap> {
|
|
@@ -82,8 +88,9 @@ interface CVACompounds<V extends VariantMap> {
|
|
|
82
88
|
type VariantProps<V extends VariantMap> = {
|
|
83
89
|
[K in keyof V]?: VariantKey<V, K>;
|
|
84
90
|
};
|
|
91
|
+
type VariantValue<K extends string> = string extends K ? Primitive : K extends 'true' | 'false' ? Booleanish : K extends `${number}` ? Numberish : K;
|
|
85
92
|
type DefaultVariants<V extends VariantMap> = {
|
|
86
|
-
[K in keyof V]?:
|
|
93
|
+
[K in keyof V]?: VariantValue<keyof V[K] & string>;
|
|
87
94
|
};
|
|
88
95
|
|
|
89
96
|
interface CVADefaults<V extends VariantMap> {
|
|
@@ -216,7 +223,7 @@ type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
|
216
223
|
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends PresetMap<V> = Readonly<EmptyRecord>, TPluginProps extends AnyRecord = EmptyRecord> = {
|
|
217
224
|
readonly base?: ClassName;
|
|
218
225
|
readonly variants?: V;
|
|
219
|
-
readonly defaults?: Partial<
|
|
226
|
+
readonly defaults?: Partial<DefaultVariants<V>>;
|
|
220
227
|
readonly compounds?: readonly CompoundVariant<V>[];
|
|
221
228
|
readonly presets?: TPreset;
|
|
222
229
|
readonly tags?: Readonly<TagMap>;
|
package/dist/web/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ type KnownAriaRole = (typeof KNOWN_ARIA_ROLES)[number];
|
|
|
11
11
|
|
|
12
12
|
type AriaRole = KnownAriaRole | (string & {});
|
|
13
13
|
|
|
14
|
+
type Booleanish = boolean | 'true' | 'false';
|
|
15
|
+
|
|
14
16
|
type ClassName = string | string[];
|
|
15
17
|
|
|
16
18
|
type EmptyRecord = Record<never, never>;
|
|
@@ -21,6 +23,10 @@ type IntrinsicProps = AnyRecord & {
|
|
|
21
23
|
|
|
22
24
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
23
25
|
|
|
26
|
+
type Numberish = number | `${number}`;
|
|
27
|
+
|
|
28
|
+
type Primitive = string | number | boolean;
|
|
29
|
+
|
|
24
30
|
type TagMap = Partial<Record<IntrinsicTag | (string & {}), ClassName>>;
|
|
25
31
|
|
|
26
32
|
type StrictMode = boolean | 'warn' | 'async-warn' | 'throw';
|
|
@@ -53,9 +59,9 @@ type ValidResult = {
|
|
|
53
59
|
|
|
54
60
|
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T;
|
|
55
61
|
|
|
56
|
-
type VariantValue = string | string[];
|
|
62
|
+
type VariantValue$1 = string | string[];
|
|
57
63
|
|
|
58
|
-
type VariantStates<K extends string = string> = Record<K, VariantValue>;
|
|
64
|
+
type VariantStates<K extends string = string> = Record<K, VariantValue$1>;
|
|
59
65
|
|
|
60
66
|
type VariantMap<V extends string = string, K extends string = string> = Record<V, VariantStates<K>>;
|
|
61
67
|
|
|
@@ -69,19 +75,16 @@ type CompoundVariantConditions<V extends VariantMap> = Simplify<{
|
|
|
69
75
|
type CompoundVariantRequiredConditions<V extends VariantMap> = RequireAtLeastOneIfNotEmpty<CompoundVariantConditions<V>>;
|
|
70
76
|
type CompoundVariantBase<V extends VariantMap> = keyof V extends never ? EmptyRecord : CompoundVariantRequiredConditions<V>;
|
|
71
77
|
type CompoundVariant<V extends VariantMap> = CompoundVariantBase<V> & {
|
|
72
|
-
class: VariantValue;
|
|
78
|
+
class: VariantValue$1;
|
|
73
79
|
};
|
|
74
80
|
|
|
75
81
|
interface CVACompounds<V extends VariantMap> {
|
|
76
82
|
compoundVariants?: readonly CompoundVariant<V>[];
|
|
77
83
|
}
|
|
78
84
|
|
|
79
|
-
|
|
80
|
-
type VariantProps<V extends VariantMap> = {
|
|
81
|
-
[K in keyof V]?: VariantKey<V, K>;
|
|
82
|
-
};
|
|
85
|
+
type VariantValue<K extends string> = string extends K ? Primitive : K extends 'true' | 'false' ? Booleanish : K extends `${number}` ? Numberish : K;
|
|
83
86
|
type DefaultVariants<V extends VariantMap> = {
|
|
84
|
-
[K in keyof V]?:
|
|
87
|
+
[K in keyof V]?: VariantValue<keyof V[K] & string>;
|
|
85
88
|
};
|
|
86
89
|
|
|
87
90
|
interface CVADefaults<V extends VariantMap> {
|
|
@@ -204,7 +207,7 @@ type EnforcementOptions<TAllowed extends ElementType = ElementType> = {
|
|
|
204
207
|
type StylingOptions<V extends Readonly<VariantMap> = Readonly<EmptyRecord>, TPreset extends PresetMap<V> = Readonly<EmptyRecord>, TPluginProps extends AnyRecord = EmptyRecord> = {
|
|
205
208
|
readonly base?: ClassName;
|
|
206
209
|
readonly variants?: V;
|
|
207
|
-
readonly defaults?: Partial<
|
|
210
|
+
readonly defaults?: Partial<DefaultVariants<V>>;
|
|
208
211
|
readonly compounds?: readonly CompoundVariant<V>[];
|
|
209
212
|
readonly presets?: TPreset;
|
|
210
213
|
readonly tags?: Readonly<TagMap>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "praxis-kit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./react": {
|
|
@@ -130,8 +130,8 @@
|
|
|
130
130
|
"vite": "^8.0.16",
|
|
131
131
|
"vue": "^3.5.38",
|
|
132
132
|
"@praxis-kit/adapter-utils": "0.0.0",
|
|
133
|
-
"@praxis-kit/
|
|
134
|
-
"@praxis-kit/
|
|
133
|
+
"@praxis-kit/shared": "0.8.0-beta.4",
|
|
134
|
+
"@praxis-kit/core": "0.8.0-beta.4"
|
|
135
135
|
},
|
|
136
136
|
"publishConfig": {
|
|
137
137
|
"access": "public"
|