@vaneui/ui 0.2.1-alpha.20250824103031.3e0b460 → 0.2.1-alpha.20250830124557.3818ff4
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/ui/badge.d.ts +1 -1
- package/dist/components/ui/card.d.ts +1 -1
- package/dist/components/ui/chip.d.ts +1 -1
- package/dist/components/ui/col.d.ts +1 -1
- package/dist/components/ui/container.d.ts +1 -1
- package/dist/components/ui/grid.d.ts +1 -1
- package/dist/components/ui/row.d.ts +1 -1
- package/dist/components/ui/section.d.ts +1 -1
- package/dist/components/ui/stack.d.ts +1 -1
- package/dist/components/ui/theme/appearance/appearanceTheme.d.ts +2 -6
- package/dist/components/ui/theme/badgeTheme.d.ts +1 -1
- package/dist/components/ui/theme/cardTheme.d.ts +1 -1
- package/dist/components/ui/theme/chipTheme.d.ts +1 -1
- package/dist/components/ui/theme/codeTheme.d.ts +1 -1
- package/dist/components/ui/theme/colTheme.d.ts +2 -1
- package/dist/components/ui/theme/containerTheme.d.ts +1 -1
- package/dist/components/ui/theme/dividerTheme.d.ts +1 -1
- package/dist/components/ui/theme/gridTheme.d.ts +2 -1
- package/dist/components/ui/theme/rowTheme.d.ts +2 -1
- package/dist/components/ui/theme/stackTheme.d.ts +2 -1
- package/dist/components/ui/typography.d.ts +1 -1
- package/dist/index.esm.js +11 -23
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -23
- package/dist/index.js.map +1 -1
- package/dist/ui.css +0 -16
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { GridProps } from './props
|
|
2
|
+
import { GridProps } from './props';
|
|
3
3
|
export declare const Grid2: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export declare const Grid3: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export declare const Grid4: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,13 +4,9 @@ import { ModeKey, AppearanceKey } from "../../props";
|
|
|
4
4
|
export interface AppearanceTheme extends Record<AppearanceKey, Record<ModeKey, string>> {
|
|
5
5
|
}
|
|
6
6
|
export declare class AppearanceTheme extends BaseTheme {
|
|
7
|
-
private readonly
|
|
8
|
-
private readonly linkClassSource?;
|
|
7
|
+
private readonly transparentClasses?;
|
|
9
8
|
private constructor();
|
|
10
9
|
getClasses(extractedKeys: CategoryProps): string[];
|
|
11
|
-
static createTheme(src?: Partial<Record<ModeKey, Partial<Record<AppearanceKey, string
|
|
12
|
-
transparentClassSource?: Record<string, string>;
|
|
13
|
-
linkClassSource?: Record<string, string>;
|
|
14
|
-
}): AppearanceTheme;
|
|
10
|
+
static createTheme(src?: Partial<Record<ModeKey, Partial<Record<AppearanceKey, string>>>>): AppearanceTheme;
|
|
15
11
|
static createLayoutBgTheme(): AppearanceTheme;
|
|
16
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseTypographyComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
2
|
-
import { BadgeProps } from "../props
|
|
2
|
+
import { BadgeProps } from "../props";
|
|
3
3
|
import { SizeTheme } from "./size/sizeTheme";
|
|
4
4
|
import { GapTheme } from "./size/gapTheme";
|
|
5
5
|
import { RadiusTheme } from "./layout/radiusTheme";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DirectionTheme } from "./layout/directionTheme";
|
|
2
2
|
import { BaseTypographyComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
3
|
-
import { CardProps } from "../props
|
|
3
|
+
import { CardProps } from "../props";
|
|
4
4
|
import { GapTheme } from "./size/gapTheme";
|
|
5
5
|
import { WrapTheme } from "./layout/wrapTheme";
|
|
6
6
|
import { BorderTheme } from "./layout/borderTheme";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseTypographyComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
2
|
-
import { ChipProps } from "../props
|
|
2
|
+
import { ChipProps } from "../props";
|
|
3
3
|
import { SizeTheme } from "./size/sizeTheme";
|
|
4
4
|
import { GapTheme } from "./size/gapTheme";
|
|
5
5
|
import { RadiusTheme } from "./layout/radiusTheme";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseTypographyComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
2
|
-
import { CodeProps } from "../props
|
|
2
|
+
import { CodeProps } from "../props";
|
|
3
3
|
import { SizeTheme } from "./size/sizeTheme";
|
|
4
4
|
import { GapTheme } from "./size/gapTheme";
|
|
5
5
|
import { RadiusTheme } from "./layout/radiusTheme";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DirectionTheme } from "./layout/directionTheme";
|
|
2
2
|
import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
3
|
-
import { ColProps } from "../props
|
|
3
|
+
import { ColProps } from "../props";
|
|
4
4
|
import { GapTheme } from "./size/gapTheme";
|
|
5
5
|
import { WrapTheme } from "./layout/wrapTheme";
|
|
6
6
|
import { AppearanceTheme } from "./appearance/appearanceTheme";
|
|
@@ -22,6 +22,7 @@ export interface ColTheme extends BaseComponentTheme {
|
|
|
22
22
|
};
|
|
23
23
|
appearance: {
|
|
24
24
|
background: AppearanceTheme;
|
|
25
|
+
text: AppearanceTheme;
|
|
25
26
|
border: GenericVariantTheme<AppearanceTheme>;
|
|
26
27
|
ring: GenericVariantTheme<AppearanceTheme>;
|
|
27
28
|
shadow: GenericVariantTheme<ShadowAppearanceTheme>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DirectionTheme } from "./layout/directionTheme";
|
|
2
2
|
import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
3
|
-
import { ContainerProps } from "../props
|
|
3
|
+
import { ContainerProps } from "../props";
|
|
4
4
|
import { GapTheme } from "./size/gapTheme";
|
|
5
5
|
import { SizeTheme } from "./size/sizeTheme";
|
|
6
6
|
import { WrapTheme } from "./layout/wrapTheme";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
2
|
-
import { DividerProps } from "../props
|
|
2
|
+
import { DividerProps } from "../props";
|
|
3
3
|
import { AppearanceTheme } from "./appearance/appearanceTheme";
|
|
4
4
|
import { PyTheme } from "./size/pyTheme";
|
|
5
5
|
export interface DividerTheme extends BaseComponentTheme {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
2
|
-
import { GridProps } from "../props
|
|
2
|
+
import { GridProps } from "../props";
|
|
3
3
|
import { GapTheme } from "./size/gapTheme";
|
|
4
4
|
import { WrapTheme } from "./layout/wrapTheme";
|
|
5
5
|
import { DirectionTheme } from "./layout/directionTheme";
|
|
@@ -10,6 +10,7 @@ export interface GridTheme extends BaseComponentTheme {
|
|
|
10
10
|
};
|
|
11
11
|
appearance: {
|
|
12
12
|
background: AppearanceTheme;
|
|
13
|
+
text: AppearanceTheme;
|
|
13
14
|
};
|
|
14
15
|
layout: DefaultLayoutThemes & {
|
|
15
16
|
wrap: WrapTheme;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GapTheme } from "./size/gapTheme";
|
|
2
2
|
import { WrapTheme } from "./layout/wrapTheme";
|
|
3
3
|
import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
4
|
-
import { RowProps } from "../props
|
|
4
|
+
import { RowProps } from "../props";
|
|
5
5
|
import { BreakpointTheme } from "./size/breakpointTheme";
|
|
6
6
|
import { AppearanceTheme } from "./appearance/appearanceTheme";
|
|
7
7
|
import { DirectionTheme } from "./layout/directionTheme";
|
|
@@ -24,6 +24,7 @@ export interface RowTheme extends BaseComponentTheme {
|
|
|
24
24
|
};
|
|
25
25
|
appearance: {
|
|
26
26
|
background: AppearanceTheme;
|
|
27
|
+
text: AppearanceTheme;
|
|
27
28
|
border: GenericVariantTheme<AppearanceTheme>;
|
|
28
29
|
ring: GenericVariantTheme<AppearanceTheme>;
|
|
29
30
|
shadow: GenericVariantTheme<ShadowAppearanceTheme>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DirectionTheme } from "./layout/directionTheme";
|
|
2
2
|
import { WrapTheme } from "./layout/wrapTheme";
|
|
3
3
|
import { BaseComponentTheme, ComponentTheme, DefaultLayoutThemes } from "./common/ComponentTheme";
|
|
4
|
-
import { StackProps } from "../props
|
|
4
|
+
import { StackProps } from "../props";
|
|
5
5
|
import { GapTheme } from "./size/gapTheme";
|
|
6
6
|
import { PxTheme } from "./size/pxTheme";
|
|
7
7
|
import { PyTheme } from "./size/pyTheme";
|
|
@@ -28,6 +28,7 @@ export interface StackTheme extends BaseComponentTheme {
|
|
|
28
28
|
};
|
|
29
29
|
appearance: {
|
|
30
30
|
background: AppearanceTheme;
|
|
31
|
+
text: AppearanceTheme;
|
|
31
32
|
border: GenericVariantTheme<AppearanceTheme>;
|
|
32
33
|
ring: GenericVariantTheme<AppearanceTheme>;
|
|
33
34
|
shadow: GenericVariantTheme<ShadowAppearanceTheme>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TypographyProps } from './props
|
|
2
|
+
import { TypographyProps } from './props';
|
|
3
3
|
export declare const PageTitle: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
4
4
|
export declare const SectionTitle: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
5
5
|
export declare const Title: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLHeadingElement>>;
|
package/dist/index.esm.js
CHANGED
|
@@ -3630,17 +3630,16 @@ const filledCheckedBackgroundAppearanceClasses = {
|
|
|
3630
3630
|
};
|
|
3631
3631
|
|
|
3632
3632
|
class AppearanceTheme extends BaseTheme {
|
|
3633
|
-
constructor(config,
|
|
3633
|
+
constructor(config, transparentClasses) {
|
|
3634
3634
|
super();
|
|
3635
3635
|
Object.assign(this, config);
|
|
3636
|
-
this.
|
|
3637
|
-
this.linkClassSource = options === null || options === void 0 ? void 0 : options.linkClassSource;
|
|
3636
|
+
this.transparentClasses = transparentClasses;
|
|
3638
3637
|
}
|
|
3639
3638
|
getClasses(extractedKeys) {
|
|
3640
3639
|
var _a;
|
|
3641
3640
|
// Check for specific transparent styles first
|
|
3642
3641
|
if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.transparent) {
|
|
3643
|
-
const transparentClass = ((_a = this.
|
|
3642
|
+
const transparentClass = ((_a = this.transparentClasses) === null || _a === void 0 ? void 0 : _a[extractedKeys.transparent]) || '';
|
|
3644
3643
|
return [transparentClass];
|
|
3645
3644
|
}
|
|
3646
3645
|
// Use appearance (now includes link as an appearance option)
|
|
@@ -3653,8 +3652,8 @@ class AppearanceTheme extends BaseTheme {
|
|
|
3653
3652
|
}
|
|
3654
3653
|
return [];
|
|
3655
3654
|
}
|
|
3656
|
-
static createTheme(src = {}
|
|
3657
|
-
const
|
|
3655
|
+
static createTheme(src = {}) {
|
|
3656
|
+
const config = Object.fromEntries(ComponentKeys.appearance.map(textKey => [
|
|
3658
3657
|
textKey,
|
|
3659
3658
|
Object.fromEntries(ComponentKeys.mode.map(modeKey => {
|
|
3660
3659
|
var _a;
|
|
@@ -3664,13 +3663,7 @@ class AppearanceTheme extends BaseTheme {
|
|
|
3664
3663
|
];
|
|
3665
3664
|
})),
|
|
3666
3665
|
]));
|
|
3667
|
-
|
|
3668
|
-
const baseClasses = src.base;
|
|
3669
|
-
const finalOptions = {
|
|
3670
|
-
transparentClassSource: (options === null || options === void 0 ? void 0 : options.transparentClassSource) || baseClasses,
|
|
3671
|
-
linkClassSource: (options === null || options === void 0 ? void 0 : options.linkClassSource) || baseClasses,
|
|
3672
|
-
};
|
|
3673
|
-
return new AppearanceTheme(finalConfig, finalOptions);
|
|
3666
|
+
return new AppearanceTheme(config, src.base);
|
|
3674
3667
|
}
|
|
3675
3668
|
static createLayoutBgTheme() {
|
|
3676
3669
|
// Creates a theme for layout backgrounds, replacing BgAppearanceTheme
|
|
@@ -3682,10 +3675,7 @@ class AppearanceTheme extends BaseTheme {
|
|
|
3682
3675
|
active: '',
|
|
3683
3676
|
}
|
|
3684
3677
|
]));
|
|
3685
|
-
return new AppearanceTheme(config,
|
|
3686
|
-
transparentClassSource: layoutBackgroundAppearanceClasses,
|
|
3687
|
-
linkClassSource: layoutBackgroundAppearanceClasses
|
|
3688
|
-
});
|
|
3678
|
+
return new AppearanceTheme(config, layoutBackgroundAppearanceClasses);
|
|
3689
3679
|
}
|
|
3690
3680
|
}
|
|
3691
3681
|
|
|
@@ -4098,7 +4088,6 @@ const themeDefaults = {
|
|
|
4098
4088
|
md: true,
|
|
4099
4089
|
flex: true,
|
|
4100
4090
|
gap: true,
|
|
4101
|
-
default: true,
|
|
4102
4091
|
sans: true,
|
|
4103
4092
|
medium: true,
|
|
4104
4093
|
},
|
|
@@ -4117,27 +4106,23 @@ const themeDefaults = {
|
|
|
4117
4106
|
},
|
|
4118
4107
|
text: {
|
|
4119
4108
|
md: true,
|
|
4120
|
-
default: true,
|
|
4121
4109
|
sans: true,
|
|
4122
4110
|
textLeft: true,
|
|
4123
4111
|
},
|
|
4124
4112
|
title: {
|
|
4125
4113
|
md: true,
|
|
4126
|
-
default: true,
|
|
4127
4114
|
sans: true,
|
|
4128
4115
|
semibold: true,
|
|
4129
4116
|
textLeft: true,
|
|
4130
4117
|
},
|
|
4131
4118
|
pageTitle: {
|
|
4132
4119
|
md: true,
|
|
4133
|
-
default: true,
|
|
4134
4120
|
sans: true,
|
|
4135
4121
|
semibold: true,
|
|
4136
4122
|
textLeft: true,
|
|
4137
4123
|
},
|
|
4138
4124
|
sectionTitle: {
|
|
4139
4125
|
md: true,
|
|
4140
|
-
default: true,
|
|
4141
4126
|
sans: true,
|
|
4142
4127
|
semibold: true,
|
|
4143
4128
|
textLeft: true,
|
|
@@ -4152,7 +4137,6 @@ const themeDefaults = {
|
|
|
4152
4137
|
},
|
|
4153
4138
|
list: {
|
|
4154
4139
|
md: true,
|
|
4155
|
-
default: true,
|
|
4156
4140
|
sans: true,
|
|
4157
4141
|
normal: true,
|
|
4158
4142
|
padding: true,
|
|
@@ -4563,6 +4547,7 @@ const defaultRowTheme = new ComponentTheme("div", "", {
|
|
|
4563
4547
|
},
|
|
4564
4548
|
appearance: {
|
|
4565
4549
|
background: AppearanceTheme.createLayoutBgTheme(),
|
|
4550
|
+
text: AppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4566
4551
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4567
4552
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4568
4553
|
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
@@ -4628,6 +4613,7 @@ const defaultColTheme = new ComponentTheme("div", "", {
|
|
|
4628
4613
|
},
|
|
4629
4614
|
appearance: {
|
|
4630
4615
|
background: AppearanceTheme.createLayoutBgTheme(),
|
|
4616
|
+
text: AppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4631
4617
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4632
4618
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4633
4619
|
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
@@ -4653,6 +4639,7 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
4653
4639
|
},
|
|
4654
4640
|
appearance: {
|
|
4655
4641
|
background: AppearanceTheme.createLayoutBgTheme(),
|
|
4642
|
+
text: AppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4656
4643
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4657
4644
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4658
4645
|
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
@@ -4711,6 +4698,7 @@ const gridSubThemes = {
|
|
|
4711
4698
|
},
|
|
4712
4699
|
appearance: {
|
|
4713
4700
|
background: AppearanceTheme.createLayoutBgTheme(),
|
|
4701
|
+
text: AppearanceTheme.createTheme({ base: textAppearanceClasses }),
|
|
4714
4702
|
},
|
|
4715
4703
|
layout: {
|
|
4716
4704
|
...defaultLayoutTheme,
|