@animus-ui/core 0.1.1-104f7aa3.0 → 0.1.1-10e59010.54

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 CHANGED
@@ -3,6 +3,46 @@
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.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)
7
+
8
+ **Note:** Version bump only for package @animus-ui/core
9
+
10
+
11
+
12
+
13
+
14
+ ## [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)
15
+
16
+ **Note:** Version bump only for package @animus-ui/core
17
+
18
+
19
+
20
+
21
+
22
+ ## [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)
23
+
24
+ **Note:** Version bump only for package @animus-ui/core
25
+
26
+
27
+
28
+
29
+
30
+ ## [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)
31
+
32
+ **Note:** Version bump only for package @animus-ui/core
33
+
34
+
35
+
36
+
37
+
38
+ ## [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)
39
+
40
+ **Note:** Version bump only for package @animus-ui/core
41
+
42
+
43
+
44
+
45
+
6
46
  ## [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)
7
47
 
8
48
  **Note:** Version bump only for package @animus-ui/core
package/dist/Animus.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { AnimusExtended } from './AnimusExtended';
2
3
  import { CSSPropMap, CSSProps, Parser, Prop, SystemProps, VariantConfig } from './types/config';
3
4
  import { AbstractProps, ThemeProps } from './types/props';
4
5
  import { CSSObject } from './types/shared';
@@ -13,13 +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
- asComponent<T extends keyof JSX.IntrinsicElements>(component: T): import("@emotion/styled").StyledComponent<{
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
- } & Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "theme" | keyof CustomProps | keyof Variants | keyof States> & { [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<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; } & {
21
+ } & Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "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; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; } & {
20
22
  theme?: import("@emotion/react").Theme | undefined;
21
- }, JSX.IntrinsicElements[T], {}>;
22
- build(): (props: ThemeProps<Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "theme" | keyof CustomProps | keyof Variants | keyof States> & { [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<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }>) => CSSObject;
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<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "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; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }, {}, {}> & {
31
+ extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
32
+ };
33
+ build(): (props: ThemeProps<Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "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; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }>) => CSSObject;
23
34
  }
24
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, {}> {
25
36
  constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups);
@@ -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<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "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; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; } & {
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<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "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; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }, {}, {}> & {
45
+ extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
46
+ };
47
+ build(): (props: ThemeProps<Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "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; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }>) => CSSObject;
48
+ }
@@ -6,22 +6,23 @@ export declare const compatTheme: {
6
6
  readonly lg: 1200;
7
7
  readonly xl: 1440;
8
8
  };
9
- readonly spacing: readonly [0, 4, 8, 12, 16, 24, 32, 40, 48, 64, 96];
10
- readonly fontSize: readonly [64, 44, 34, 26, 22, 20, 18, 16, 14];
11
- readonly lineHeight: {
12
- readonly body: 1.5;
13
- readonly heading: 1;
14
- };
15
- readonly fontWeight: readonly [400, 600, 700];
16
- readonly fontFamily: {
17
- readonly body: "Verdana, sans-serif";
18
- readonly heading: "Verdana, Lato, sans-serif";
19
- readonly monospace: "monospace";
20
- };
21
- readonly radii: readonly [2, 4, 6, 8];
22
- readonly borders: readonly [1, 2, 3];
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 & {}))[];
23
18
  readonly colors: {};
19
+ readonly gradients: {};
20
+ readonly shadows: {};
24
21
  readonly modes: {};
22
+ readonly transitions: {};
23
+ readonly animations: {};
24
+ readonly zIndices: {};
25
+ readonly opacities: {};
25
26
  readonly mode: undefined;
26
27
  };
27
28
  export declare type CompatTheme = typeof compatTheme;