@vaneui/ui 0.0.19 → 0.1.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/dist/components/theme/components/ui/classes/appearanceClasses.d.ts +1 -1
- package/dist/components/theme/components/ui/props/keys.d.ts +16 -14
- package/dist/components/theme/components/ui/props/props.d.ts +4 -3
- package/dist/components/theme/components/ui/theme/common/ComponentTheme.d.ts +9 -1
- package/dist/components/theme/components/ui/theme/containerTheme.d.ts +2 -0
- package/dist/components/theme/components/ui/theme/layout/displayTheme.d.ts +9 -0
- package/dist/components/theme/components/utils/componentUtils.d.ts +1 -1
- package/dist/components/theme/index.js +2893 -137
- package/dist/components/theme/index.js.map +1 -1
- package/dist/components/ui/classes/appearanceClasses.d.ts +1 -1
- package/dist/components/ui/col.d.ts +0 -7
- package/dist/components/ui/props/keys.d.ts +16 -14
- package/dist/components/ui/props/props.d.ts +4 -3
- package/dist/components/ui/theme/common/ComponentTheme.d.ts +9 -1
- package/dist/components/ui/theme/containerTheme.d.ts +2 -0
- package/dist/components/ui/theme/layout/displayTheme.d.ts +9 -0
- package/dist/components/utils/buildComponent.d.ts +6 -7
- package/dist/components/utils/componentUtils.d.ts +1 -1
- package/dist/index.esm.js +3327 -3311
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3326 -3310
- package/dist/index.js.map +1 -1
- package/dist/ui.css +24 -0
- package/dist/vars.css +121 -128
- package/package.json +5 -20
- package/dist/complex.css +0 -2025
- package/dist/components/theme/components/ui/classes/layoutClasses.d.ts +0 -13
- package/dist/components/ui/classes/layoutClasses.d.ts +0 -13
|
@@ -11,6 +11,8 @@ import { TextDecorationTheme } from "../typography/textDecorationTheme";
|
|
|
11
11
|
import { TextTransformTheme } from "../typography/textTransformTheme";
|
|
12
12
|
import { TextAlignTheme } from "../typography/textAlignTheme";
|
|
13
13
|
import { DeepPartial } from "../../../utils/deepPartial";
|
|
14
|
+
import { DisplayTheme } from "../layout/displayTheme";
|
|
15
|
+
import { ComponentProps } from "../../props/props";
|
|
14
16
|
type ThemeNode<P> = BaseTheme | ThemeMap<P>;
|
|
15
17
|
export type ThemeMap<P> = {
|
|
16
18
|
[key: string]: ThemeNode<P>;
|
|
@@ -20,6 +22,7 @@ export interface DefaultLayoutThemes<P> {
|
|
|
20
22
|
items: ItemsTheme;
|
|
21
23
|
justify: JustifyTheme;
|
|
22
24
|
position: PositionTheme;
|
|
25
|
+
display: DisplayTheme;
|
|
23
26
|
}
|
|
24
27
|
export interface DefaultTypographyThemes<P> {
|
|
25
28
|
fontFamily: FontFamilyTheme;
|
|
@@ -33,12 +36,17 @@ export interface BaseComponentTheme<P> {
|
|
|
33
36
|
layout: DefaultLayoutThemes<P>;
|
|
34
37
|
typography: DefaultTypographyThemes<P>;
|
|
35
38
|
}
|
|
36
|
-
export declare class ComponentTheme<P extends
|
|
39
|
+
export declare class ComponentTheme<P extends ComponentProps, TThemes extends object> {
|
|
37
40
|
readonly tag: React.ElementType;
|
|
38
41
|
readonly base: string;
|
|
39
42
|
readonly themes: TThemes;
|
|
40
43
|
defaults: Partial<P>;
|
|
41
44
|
constructor(tag: React.ElementType, base: string, subThemes: DeepPartial<TThemes>, defaults?: Partial<P>);
|
|
42
45
|
getClasses(props: P, defaults?: Partial<P>): string[];
|
|
46
|
+
getComponentConfig(props: P, propsToOmit?: readonly string[]): {
|
|
47
|
+
Tag: React.ElementType<any, keyof React.JSX.IntrinsicElements>;
|
|
48
|
+
finalClasses: string;
|
|
49
|
+
finalProps: Omit<P, "tag" | "className">;
|
|
50
|
+
};
|
|
43
51
|
}
|
|
44
52
|
export {};
|
|
@@ -8,6 +8,7 @@ import { BorderTheme } from "./layout/borderTheme";
|
|
|
8
8
|
import { RingTheme } from "./layout/ringTheme";
|
|
9
9
|
import { LayoutAppearanceTheme } from "./appearance/layoutAppearanceTheme";
|
|
10
10
|
import { TextAppearanceTheme } from "./appearance/textAppearanceTheme";
|
|
11
|
+
import { RadiusTheme } from "./layout/radiusTheme";
|
|
11
12
|
export interface ContainerTheme<P> extends BaseComponentTheme<P> {
|
|
12
13
|
size: {
|
|
13
14
|
gap: GapTheme;
|
|
@@ -18,6 +19,7 @@ export interface ContainerTheme<P> extends BaseComponentTheme<P> {
|
|
|
18
19
|
direction: DirectionTheme;
|
|
19
20
|
border: BorderTheme;
|
|
20
21
|
ring: RingTheme;
|
|
22
|
+
radius: RadiusTheme;
|
|
21
23
|
};
|
|
22
24
|
appearance: {
|
|
23
25
|
background: LayoutAppearanceTheme;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DisplayKey } from "../../props/keys";
|
|
2
|
+
import { BaseTheme } from "../common/baseTheme";
|
|
3
|
+
export interface DisplayTheme extends Record<DisplayKey, string> {
|
|
4
|
+
}
|
|
5
|
+
export declare class DisplayTheme extends BaseTheme {
|
|
6
|
+
static readonly defaultClasses: Record<DisplayKey, string>;
|
|
7
|
+
constructor(initialConfig?: Partial<Record<DisplayKey, string>>);
|
|
8
|
+
getClasses(props: Record<string, boolean>, defaults: Record<string, boolean>): string[];
|
|
9
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { ComponentTheme } from "../ui/theme/common/ComponentTheme";
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export declare function
|
|
2
|
+
import { ComponentProps } from "../ui/props/props";
|
|
3
|
+
export type ThemedComponentProps<P extends ComponentProps, T extends object> = P & {
|
|
4
|
+
theme: ComponentTheme<P, T>;
|
|
5
|
+
propsToOmit?: readonly string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function ThemedComponent<P extends ComponentProps, T extends object>({ theme, propsToOmit, ...props }: ThemedComponentProps<P, T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Pick the first truthy key from props, then from defaults, then
|
|
2
|
+
* Pick the first truthy key from props, then from defaults, then undefined.
|
|
3
3
|
*/
|
|
4
4
|
export declare function pickFirstTruthyKey<P, K extends keyof P>(props: Partial<P>, defaults: Partial<P>, keys: readonly K[]): K | undefined;
|