@animus-ui/core 0.1.1-beta.5 → 0.1.1-beta.9
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/CHANGELOG.md +32 -0
- package/README.md +1 -86
- package/dist/Animus.d.ts +63 -0
- package/dist/AnimusConfig.d.ts +8 -0
- package/dist/{utils/__fixtures__ → __fixtures__}/testConfig.d.ts +0 -0
- package/dist/compatTheme.d.ts +20 -0
- package/dist/config.d.ts +2193 -0
- package/dist/createAnimus.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +417 -997
- package/dist/index.esm.js +1 -1
- package/dist/legacy/compose.d.ts +2 -0
- package/dist/legacy/config.d.ts +85 -0
- package/dist/legacy/core.d.ts +12 -0
- package/dist/legacy/create.d.ts +2 -0
- package/dist/{internal → legacy}/createCss.d.ts +1 -1
- package/dist/legacy/createParser.d.ts +9 -0
- package/dist/{internal → legacy}/createStates.d.ts +1 -1
- package/dist/{styles → legacy}/createTransform.d.ts +1 -1
- package/dist/{internal → legacy}/createVariant.d.ts +1 -1
- package/dist/{utils → legacy}/responsive.d.ts +3 -2
- package/dist/properties/getStylePropNames.d.ts +1 -0
- package/dist/{utils/propNames.d.ts → properties/orderPropNames.d.ts} +1 -1
- package/dist/{utils → properties}/styledOptions.d.ts +0 -0
- package/dist/scales/lookupScaleValue.d.ts +3 -0
- package/dist/styles/createParser.d.ts +2 -2
- package/dist/styles/createPropertyStyle.d.ts +3 -0
- package/dist/styles/createStylist.d.ts +1 -1
- package/dist/styles/responsive.d.ts +14 -0
- package/dist/transforms/border.d.ts +1 -0
- package/dist/transforms/index.d.ts +2 -0
- package/dist/transforms/utils.d.ts +2 -0
- package/dist/types/config.d.ts +24 -62
- package/dist/types/properties.d.ts +4 -3
- package/dist/types/props.d.ts +1 -5
- package/dist/types/scales.d.ts +2 -0
- package/dist/types/shared.d.ts +4 -0
- package/dist/types/theme.d.ts +0 -16
- package/dist/types/utils.d.ts +1 -0
- package/package.json +5 -3
- package/dist/animusBuilder.d.ts +0 -81
- package/dist/configBuilder.d.ts +0 -11
- package/dist/deprecated/core.d.ts +0 -10
- package/dist/internal/compose.d.ts +0 -2
- package/dist/internal/create.d.ts +0 -2
- package/dist/props/baseConfig.d.ts +0 -588
- package/dist/props/baseScales.d.ts +0 -51
- package/dist/scales/createScaleLookup.d.ts +0 -5
- package/dist/utils/getStaticProperties.d.ts +0 -1
package/dist/animusBuilder.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Parser, Prop, SystemProps, TransformerMap } from './types/config';
|
|
3
|
-
import { AbstractProps, CSSPropMap, CSSProps, CSSObject, ThemeProps } from './types/props';
|
|
4
|
-
import { Arg, PropConfig } from './types/config';
|
|
5
|
-
export declare class AnimusWithAll<C extends PropConfig, P extends Parser<TransformerMap<C['props']>>, Base extends CSSProps<AbstractProps, SystemProps<P>>, Variants extends Record<string, {
|
|
6
|
-
prop?: any;
|
|
7
|
-
defaultVariant?: any;
|
|
8
|
-
base?: CSSProps<AbstractProps, SystemProps<P>>;
|
|
9
|
-
variants: CSSPropMap<AbstractProps, SystemProps<P>>;
|
|
10
|
-
}>, States extends CSSPropMap<AbstractProps, SystemProps<P>>, G extends (keyof C['groups'])[] | never[], CustomProps extends PropConfig['props']> {
|
|
11
|
-
props: C;
|
|
12
|
-
parser: P;
|
|
13
|
-
groups: G;
|
|
14
|
-
base: Base;
|
|
15
|
-
statesConfig: States;
|
|
16
|
-
variants: Variants;
|
|
17
|
-
custom: CustomProps;
|
|
18
|
-
constructor(props: C, parser: P, base: Base, variants: Variants, states: States, groups: G, custom: CustomProps);
|
|
19
|
-
asComponent<T extends keyof JSX.IntrinsicElements>(component: T): import("@emotion/styled").StyledComponent<{
|
|
20
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
-
as?: import("react").ElementType<any> | undefined;
|
|
22
|
-
} & { [K_4 in keyof ThemeProps<{ [K in keyof Arg<P> as K extends C["groups"][G[number]][number] ? K : never]?: Arg<P>[K] | undefined; } & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<TransformerMap<CustomProps>>]: import("./types/config").ParserProps<TransformerMap<CustomProps>>[K_3]; }>]: ThemeProps<{ [K in keyof Arg<P> as K extends C["groups"][G[number]][number] ? K : never]?: Arg<P>[K] | undefined; } & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<TransformerMap<CustomProps>>]: import("./types/config").ParserProps<TransformerMap<CustomProps>>[K_3]; }>[K_4]; }, JSX.IntrinsicElements[T], {}>;
|
|
23
|
-
build(): (props: { [K in keyof ThemeProps<{ [K_1 in keyof Arg<P> as K_1 extends C["groups"][G[number]][number] ? K_1 : never]?: Arg<P>[K_1] | undefined; } & { [K_2 in keyof Variants]?: keyof Variants[K_2]["variants"] | undefined; } & { [K_3 in keyof States]?: boolean | undefined; } & { [K_4 in keyof import("./types/config").ParserProps<TransformerMap<CustomProps>>]: import("./types/config").ParserProps<TransformerMap<CustomProps>>[K_4]; }>]: ThemeProps<{ [K_1 in keyof Arg<P> as K_1 extends C["groups"][G[number]][number] ? K_1 : never]?: Arg<P>[K_1] | undefined; } & { [K_2 in keyof Variants]?: keyof Variants[K_2]["variants"] | undefined; } & { [K_3 in keyof States]?: boolean | undefined; } & { [K_4 in keyof import("./types/config").ParserProps<TransformerMap<CustomProps>>]: import("./types/config").ParserProps<TransformerMap<CustomProps>>[K_4]; }>[K]; }) => CSSObject;
|
|
24
|
-
}
|
|
25
|
-
declare class AnimusWithSystem<C extends PropConfig, P extends Parser<TransformerMap<C['props']>>, Base extends CSSProps<AbstractProps, SystemProps<P>>, Variants extends Record<string, {
|
|
26
|
-
prop?: any;
|
|
27
|
-
defaultVariant?: any;
|
|
28
|
-
base?: CSSProps<AbstractProps, SystemProps<P>>;
|
|
29
|
-
variants: CSSPropMap<AbstractProps, SystemProps<P>>;
|
|
30
|
-
}>, States extends CSSPropMap<AbstractProps, SystemProps<P>>, G extends (keyof C['groups'])[] | never[]> extends AnimusWithAll<C, P, Base, Variants, States, G, {}> {
|
|
31
|
-
constructor(props: C, parser: P, base: Base, variants: Variants, states: States, groups: G);
|
|
32
|
-
customProps<CustomProps extends Record<string, Prop>>(config: CustomProps): AnimusWithAll<C, P, Base, Variants, States, G, CustomProps>;
|
|
33
|
-
}
|
|
34
|
-
declare class AnimusWithStates<C extends PropConfig, P extends Parser<TransformerMap<C['props']>>, Base extends CSSProps<AbstractProps, SystemProps<P>>, Variants extends Record<string, {
|
|
35
|
-
prop?: any;
|
|
36
|
-
defaultVariant?: any;
|
|
37
|
-
base?: CSSProps<AbstractProps, SystemProps<P>>;
|
|
38
|
-
variants: CSSPropMap<AbstractProps, SystemProps<P>>;
|
|
39
|
-
}>, States extends CSSPropMap<AbstractProps, SystemProps<P>>> extends AnimusWithSystem<C, P, Base, Variants, States, []> {
|
|
40
|
-
constructor(props: C, parser: P, base: Base, variants: Variants, states: States);
|
|
41
|
-
systemProps<PickedGroups extends keyof C['groups']>(config: Record<PickedGroups, true>): AnimusWithSystem<C, P, Base, Variants, States, PickedGroups[]>;
|
|
42
|
-
}
|
|
43
|
-
declare class AnimusWithVariants<C extends PropConfig, P extends Parser<TransformerMap<C['props']>>, Base extends CSSProps<AbstractProps, SystemProps<P>>, Variants extends Record<string, {
|
|
44
|
-
prop?: any;
|
|
45
|
-
defaultVariant?: any;
|
|
46
|
-
base?: CSSProps<AbstractProps, SystemProps<P>>;
|
|
47
|
-
variants: CSSPropMap<AbstractProps, SystemProps<P>>;
|
|
48
|
-
}>> extends AnimusWithStates<C, P, Base, Variants, {}> {
|
|
49
|
-
constructor(props: C, parser: P, base: Base, variants: Variants);
|
|
50
|
-
states<Props extends AbstractProps>(config: CSSPropMap<Props, SystemProps<P>>): AnimusWithStates<C, P, Base, Variants, CSSPropMap<Props, SystemProps<P>>>;
|
|
51
|
-
variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
|
|
52
|
-
prop?: PropKey;
|
|
53
|
-
defaultVariant?: keyof Props;
|
|
54
|
-
base?: CSSProps<Base, SystemProps<P>>;
|
|
55
|
-
variants: CSSPropMap<Props, SystemProps<P>>;
|
|
56
|
-
}): AnimusWithVariants<C, P, Base, Variants & Record<PropKey, {
|
|
57
|
-
prop?: PropKey | undefined;
|
|
58
|
-
defaultVariant?: keyof Props | undefined;
|
|
59
|
-
base?: CSSProps<Base, SystemProps<P>> | undefined;
|
|
60
|
-
variants: CSSPropMap<Props, SystemProps<P>>;
|
|
61
|
-
}>>;
|
|
62
|
-
}
|
|
63
|
-
declare class AnimusWithBase<C extends PropConfig, P extends Parser<TransformerMap<C['props']>>, Base extends CSSProps<AbstractProps, SystemProps<P>>> extends AnimusWithVariants<C, P, Base, {}> {
|
|
64
|
-
constructor(props: C, parser: P, base: Base);
|
|
65
|
-
variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
|
|
66
|
-
prop?: PropKey;
|
|
67
|
-
defaultVariant?: keyof Props;
|
|
68
|
-
base?: CSSProps<Base, SystemProps<P>>;
|
|
69
|
-
variants: CSSPropMap<Props, SystemProps<P>>;
|
|
70
|
-
}): AnimusWithVariants<C, P, Base, Record<PropKey, {
|
|
71
|
-
prop?: PropKey | undefined;
|
|
72
|
-
defaultVariant?: keyof Props | undefined;
|
|
73
|
-
base?: CSSProps<Base, SystemProps<P>> | undefined;
|
|
74
|
-
variants: CSSPropMap<Props, SystemProps<P>>;
|
|
75
|
-
}>>;
|
|
76
|
-
}
|
|
77
|
-
export declare class Animus<C extends PropConfig, P extends Parser<TransformerMap<C['props']>>> extends AnimusWithBase<C, P, {}> {
|
|
78
|
-
constructor(config: C);
|
|
79
|
-
styles<Props extends AbstractProps>(config: CSSProps<Props, SystemProps<P>>): AnimusWithBase<C, P, CSSProps<Props, SystemProps<P>>>;
|
|
80
|
-
}
|
|
81
|
-
export {};
|
package/dist/configBuilder.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PropConfig } from './types/config';
|
|
2
|
-
import { Animus } from './animusBuilder';
|
|
3
|
-
export declare class AnimusConfig<C extends PropConfig['props'] = {}, G extends Record<string, (keyof C)[]> = {}> {
|
|
4
|
-
#private;
|
|
5
|
-
constructor(config?: C, groups?: G);
|
|
6
|
-
addGroup<Name extends string, Conf extends PropConfig['props'], PropNames extends keyof Conf>(name: Name, config: Conf): AnimusConfig<C & Conf, G & Record<Name, PropNames[]>>;
|
|
7
|
-
build(): Animus<{
|
|
8
|
-
props: { [K in keyof C]: C[K]; };
|
|
9
|
-
groups: { [K_1 in keyof G]: G[K_1]; };
|
|
10
|
-
}, import("./types/config").Parser<import("./types/config").TransformerMap<{ [K in keyof C]: C[K]; }>>>;
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createCss } from '../internal/createCss';
|
|
2
|
-
import { createVariant } from '../internal/createVariant';
|
|
3
|
-
import { create } from '../internal/create';
|
|
4
|
-
import { compose } from '../internal/compose';
|
|
5
|
-
export declare const animusProps: {
|
|
6
|
-
compose: typeof compose;
|
|
7
|
-
create: typeof create;
|
|
8
|
-
createCss: typeof createCss;
|
|
9
|
-
createVariant: typeof createVariant;
|
|
10
|
-
};
|