@animus-ui/core 0.1.1-beta.8 → 0.1.1-c5e4903f.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/CHANGELOG.md +112 -0
- package/dist/Animus.d.ts +18 -5
- package/dist/AnimusConfig.d.ts +1 -1
- package/dist/AnimusExtended.d.ts +48 -0
- package/dist/compatTheme.d.ts +22 -14
- package/dist/config.d.ts +273 -145
- package/dist/index.d.ts +135 -70
- package/dist/index.js +2245 -0
- package/dist/legacy/config.d.ts +13 -12
- package/dist/legacy/core.d.ts +3 -3
- package/dist/legacy/createParser.d.ts +0 -7
- package/dist/legacy/responsive.d.ts +2 -2
- package/dist/properties/styledOptions.d.ts +3 -3
- package/dist/scales/createScale.d.ts +3 -0
- package/dist/styles/createParser.d.ts +1 -8
- package/dist/styles/createPropertyStyle.d.ts +3 -2
- package/dist/styles/createStylist.d.ts +1 -1
- package/dist/styles/responsive.d.ts +1 -1
- package/dist/types/config.d.ts +17 -11
- package/dist/types/properties.d.ts +11 -14
- package/dist/types/props.d.ts +3 -12
- package/dist/types/scales.d.ts +2 -2
- package/dist/types/shared.d.ts +1 -1
- package/dist/types/utils.d.ts +4 -4
- package/package.json +10 -8
- package/rollup.config.js +2 -2
- package/tsconfig.json +4 -2
- package/dist/index.cjs.js +0 -1
- package/dist/index.esm.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,118 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.1.1-beta.22](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.21...@animus-ui/core@0.1.1-beta.22) (2023-03-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.1.1-beta.21](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.20...@animus-ui/core@0.1.1-beta.21) (2022-03-25)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.1.1-beta.20](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.19...@animus-ui/core@0.1.1-beta.20) (2022-02-14)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [0.1.1-beta.19](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.18...@animus-ui/core@0.1.1-beta.19) (2022-02-14)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [0.1.1-beta.18](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.17...@animus-ui/core@0.1.1-beta.18) (2022-02-11)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [0.1.1-beta.17](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.16...@animus-ui/core@0.1.1-beta.17) (2022-02-02)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [0.1.1-beta.16](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.15...@animus-ui/core@0.1.1-beta.16) (2022-02-02)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## [0.1.1-beta.15](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.14...@animus-ui/core@0.1.1-beta.15) (2022-01-26)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [0.1.1-beta.14](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.13...@animus-ui/core@0.1.1-beta.14) (2022-01-24)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## [0.1.1-beta.13](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.12...@animus-ui/core@0.1.1-beta.13) (2022-01-24)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## [0.1.1-beta.12](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.11...@animus-ui/core@0.1.1-beta.12) (2022-01-24)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## [0.1.1-beta.11](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.10...@animus-ui/core@0.1.1-beta.11) (2022-01-24)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## [0.1.1-beta.10](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.9...@animus-ui/core@0.1.1-beta.10) (2022-01-23)
|
|
103
|
+
|
|
104
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## [0.1.1-beta.9](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.8...@animus-ui/core@0.1.1-beta.9) (2022-01-18)
|
|
111
|
+
|
|
112
|
+
**Note:** Version bump only for package @animus-ui/core
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
6
118
|
## [0.1.1-beta.8](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.7...@animus-ui/core@0.1.1-beta.8) (2022-01-16)
|
|
7
119
|
|
|
8
120
|
**Note:** Version bump only for package @animus-ui/core
|
package/dist/Animus.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { AnimusExtended } from './AnimusExtended';
|
|
3
|
+
import { CSSPropMap, CSSProps, Parser, Prop, SystemProps, VariantConfig } from './types/config';
|
|
4
|
+
import { AbstractProps, ThemeProps } from './types/props';
|
|
3
5
|
import { CSSObject } from './types/shared';
|
|
4
|
-
import { Parser, Prop, SystemProps, VariantConfig } from './types/config';
|
|
5
6
|
import { Arg } from './types/utils';
|
|
6
7
|
export declare class AnimusWithAll<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>, ActiveGroups extends Record<string, true>, CustomProps extends Record<string, Prop>> {
|
|
7
8
|
propRegistry: PropRegistry;
|
|
@@ -13,11 +14,23 @@ export declare class AnimusWithAll<PropRegistry extends Record<string, Prop>, Gr
|
|
|
13
14
|
activeGroups: ActiveGroups;
|
|
14
15
|
custom: CustomProps;
|
|
15
16
|
constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups, custom: CustomProps);
|
|
16
|
-
|
|
17
|
+
extend(): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
|
|
18
|
+
asElement<T extends keyof JSX.IntrinsicElements>(component: T): import("@emotion/styled").StyledComponent<{
|
|
17
19
|
theme?: import("@emotion/react").Theme | undefined;
|
|
18
20
|
as?: import("react").ElementType<any> | undefined;
|
|
19
|
-
} &
|
|
20
|
-
|
|
21
|
+
} & Omit<Arg<BaseParser> extends infer T_1 ? { [K in keyof T_1 as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & (import("./types/config").ParserProps<CustomProps> extends infer T_2 ? { [K_3 in keyof T_2]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never) & {
|
|
22
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
+
}, JSX.IntrinsicElements[T], {}> & {
|
|
24
|
+
extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
|
|
25
|
+
};
|
|
26
|
+
asComponent<T extends (props: {
|
|
27
|
+
className?: string;
|
|
28
|
+
}) => any>(AsComponent: T): import("@emotion/styled").StyledComponent<JSX.LibraryManagedAttributes<T, import("react").ComponentProps<T>> & {
|
|
29
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
30
|
+
} & Omit<Arg<BaseParser> extends infer T_1 ? { [K in keyof T_1 as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & (import("./types/config").ParserProps<CustomProps> extends infer T_2 ? { [K_3 in keyof T_2]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never), {}, {}> & {
|
|
31
|
+
extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
|
|
32
|
+
};
|
|
33
|
+
build(): (props: ThemeProps<Omit<Arg<BaseParser> extends infer T ? { [K in keyof T as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & (import("./types/config").ParserProps<CustomProps> extends infer T_1 ? { [K_3 in keyof T_1]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never)>) => CSSObject;
|
|
21
34
|
}
|
|
22
35
|
declare class AnimusWithSystem<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>, ActiveGroups extends Record<string, true>> extends AnimusWithAll<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, {}> {
|
|
23
36
|
constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups);
|
package/dist/AnimusConfig.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Prop } from './types/config';
|
|
2
1
|
import { Animus } from './Animus';
|
|
2
|
+
import { Prop } from './types/config';
|
|
3
3
|
export declare class AnimusConfig<C extends Record<string, Prop> = {}, G extends Record<string, (keyof C)[]> = {}> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(config?: C, groups?: G);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CSSPropMap, CSSProps, Parser, Prop, SystemProps, VariantConfig } from './types/config';
|
|
3
|
+
import { AbstractProps, ThemeProps } from './types/props';
|
|
4
|
+
import { CSSObject } from './types/shared';
|
|
5
|
+
import { Arg } from './types/utils';
|
|
6
|
+
export declare class AnimusExtended<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>, ActiveGroups extends Record<string, true>, CustomProps extends Record<string, Prop>> {
|
|
7
|
+
propRegistry: PropRegistry;
|
|
8
|
+
groupRegistry: GroupRegistry;
|
|
9
|
+
parser: BaseParser;
|
|
10
|
+
baseStyles: BaseStyles;
|
|
11
|
+
statesConfig: States;
|
|
12
|
+
variants: Variants;
|
|
13
|
+
activeGroups: ActiveGroups;
|
|
14
|
+
custom: CustomProps;
|
|
15
|
+
constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups, custom: CustomProps);
|
|
16
|
+
extend(): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
|
|
17
|
+
styles<Props extends AbstractProps>(config: CSSProps<Props, SystemProps<BaseParser>>): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles & CSSProps<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>, Variants, States, ActiveGroups, CustomProps>;
|
|
18
|
+
variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
|
|
19
|
+
prop?: PropKey;
|
|
20
|
+
defaultVariant?: keyof Props;
|
|
21
|
+
base?: CSSProps<Base, SystemProps<BaseParser>>;
|
|
22
|
+
variants: CSSPropMap<Props, SystemProps<BaseParser>>;
|
|
23
|
+
}): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants & Record<PropKey, {
|
|
24
|
+
prop?: PropKey | undefined;
|
|
25
|
+
defaultVariant?: keyof Props | undefined;
|
|
26
|
+
base?: CSSProps<Base, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>> | undefined;
|
|
27
|
+
variants: CSSPropMap<Props, SystemProps<BaseParser>>;
|
|
28
|
+
}>, States, ActiveGroups, CustomProps>;
|
|
29
|
+
states<Props extends AbstractProps>(config: CSSPropMap<Props, SystemProps<BaseParser>>): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States & CSSPropMap<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>, ActiveGroups, CustomProps>;
|
|
30
|
+
groups<PickedGroups extends keyof GroupRegistry>(config: Record<PickedGroups, true>): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups & Record<PickedGroups, true>, CustomProps>;
|
|
31
|
+
props<CustomProps extends Record<string, Prop>>(config: CustomProps): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, {} & CustomProps & CustomProps>;
|
|
32
|
+
asElement<T extends keyof JSX.IntrinsicElements>(component: T): import("@emotion/styled").StyledComponent<{
|
|
33
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
34
|
+
as?: import("react").ElementType<any> | undefined;
|
|
35
|
+
} & Omit<Arg<BaseParser> extends infer T_1 ? { [K in keyof T_1 as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & (import("./types/config").ParserProps<CustomProps> extends infer T_2 ? { [K_3 in keyof T_2]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never) & {
|
|
36
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
37
|
+
}, JSX.IntrinsicElements[T], {}> & {
|
|
38
|
+
extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
|
|
39
|
+
};
|
|
40
|
+
asComponent<T extends (props: {
|
|
41
|
+
className?: string;
|
|
42
|
+
}) => any>(AsComponent: T): import("@emotion/styled").StyledComponent<JSX.LibraryManagedAttributes<T, import("react").ComponentProps<T>> & {
|
|
43
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
44
|
+
} & Omit<Arg<BaseParser> extends infer T_1 ? { [K in keyof T_1 as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & (import("./types/config").ParserProps<CustomProps> extends infer T_2 ? { [K_3 in keyof T_2]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never), {}, {}> & {
|
|
45
|
+
extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
|
|
46
|
+
};
|
|
47
|
+
build(): (props: ThemeProps<Omit<Arg<BaseParser> extends infer T ? { [K in keyof T as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & (import("./types/config").ParserProps<CustomProps> extends infer T_1 ? { [K_3 in keyof T_1]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never)>) => CSSObject;
|
|
48
|
+
}
|
package/dist/compatTheme.d.ts
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
export declare const compatTheme: {
|
|
2
|
-
readonly
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
2
|
+
readonly breakpoints: {
|
|
3
|
+
readonly xs: 480;
|
|
4
|
+
readonly sm: 768;
|
|
5
|
+
readonly md: 1024;
|
|
6
|
+
readonly lg: 1200;
|
|
7
|
+
readonly xl: 1440;
|
|
7
8
|
};
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
readonly radii:
|
|
15
|
-
readonly borders:
|
|
9
|
+
readonly space: readonly [0, 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 96];
|
|
10
|
+
readonly fontSizes: readonly [64, 44, 34, 26, 22, 20, 18, 16, 14];
|
|
11
|
+
readonly lineHeights: ((string & {}) | (number & {}))[];
|
|
12
|
+
readonly letterSpacings: {};
|
|
13
|
+
readonly fontWeights: ((string & {}) | (number & {}))[];
|
|
14
|
+
readonly fonts: {};
|
|
15
|
+
readonly radii: ((string & {}) | (number & {}))[];
|
|
16
|
+
readonly borders: ((string & {}) | (number & {}))[];
|
|
17
|
+
readonly borderWidths: ((string & {}) | (number & {}))[];
|
|
16
18
|
readonly colors: {};
|
|
19
|
+
readonly gradients: {};
|
|
20
|
+
readonly shadows: {};
|
|
17
21
|
readonly modes: {};
|
|
22
|
+
readonly transitions: {};
|
|
23
|
+
readonly animations: {};
|
|
24
|
+
readonly zIndices: {};
|
|
25
|
+
readonly opacities: {};
|
|
18
26
|
readonly mode: undefined;
|
|
19
27
|
};
|
|
20
|
-
export
|
|
28
|
+
export type CompatTheme = typeof compatTheme;
|