@vaneui/ui 0.3.1-alpha.20251222154252.88fa4ba → 0.3.1-alpha.20251223092345.7b8ce70
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/themeContext.d.ts +2 -2
- package/dist/components/themeContext.d.ts.map +1 -1
- package/dist/components/ui/classes/appearanceClasses.d.ts.map +1 -1
- package/dist/components/ui/classes/typographyClasses.d.ts.map +1 -1
- package/dist/components/ui/props/appearanceProps.d.ts +0 -2
- package/dist/components/ui/props/appearanceProps.d.ts.map +1 -1
- package/dist/components/ui/props/keys.d.ts +1 -1
- package/dist/components/ui/theme/appearance/linkVariantTheme.d.ts +17 -0
- package/dist/components/ui/theme/appearance/linkVariantTheme.d.ts.map +1 -0
- package/dist/components/ui/theme/defaults.d.ts.map +1 -1
- package/dist/components/ui/theme/typographyTheme.d.ts +12 -1
- package/dist/components/ui/theme/typographyTheme.d.ts.map +1 -1
- package/dist/index.esm.js +29 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +29 -25
- package/dist/index.js.map +1 -1
- package/dist/ui.css +69 -127
- package/dist/vars.css +57 -58
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ const APPEARANCE_CATEGORY = ['text', 'border', 'ring', 'shadow', 'bg', 'accent',
|
|
|
75
75
|
/** Component property keys mapping categories to their available values */
|
|
76
76
|
const ComponentKeys = {
|
|
77
77
|
/** Color appearance options */
|
|
78
|
-
appearance: ['default', 'accent', 'primary', 'secondary', 'tertiary', 'success', 'danger', 'warning', 'info'
|
|
78
|
+
appearance: ['default', 'accent', 'primary', 'secondary', 'tertiary', 'success', 'danger', 'warning', 'info'],
|
|
79
79
|
/** Border visibility: includes all border variations and noBorder (border, borderT, borderB, etc., noBorder) */
|
|
80
80
|
border: ['border', 'borderT', 'borderB', 'borderL', 'borderR', 'borderX', 'borderY', 'noBorder'],
|
|
81
81
|
/** Column breakpoints for responsive grid layouts */
|
|
@@ -3762,7 +3762,6 @@ const filledTextAppearanceClasses = {
|
|
|
3762
3762
|
primary: "text-(--color-text-filled-primary)",
|
|
3763
3763
|
secondary: "text-(--color-text-filled-secondary)",
|
|
3764
3764
|
tertiary: "text-(--color-text-filled-tertiary)",
|
|
3765
|
-
link: "text-(--color-text-filled-link)",
|
|
3766
3765
|
accent: "text-(--color-text-filled-accent)",
|
|
3767
3766
|
success: "text-(--color-text-filled-success)",
|
|
3768
3767
|
danger: "text-(--color-text-filled-danger)",
|
|
@@ -3775,7 +3774,6 @@ const textAppearanceClasses = {
|
|
|
3775
3774
|
primary: "text-(--color-text-primary)",
|
|
3776
3775
|
secondary: "text-(--color-text-secondary)",
|
|
3777
3776
|
tertiary: "text-(--color-text-tertiary)",
|
|
3778
|
-
link: "text-(--color-text-link)",
|
|
3779
3777
|
accent: "text-(--color-text-accent)",
|
|
3780
3778
|
success: "text-(--color-text-success)",
|
|
3781
3779
|
danger: "text-(--color-text-danger)",
|
|
@@ -3795,7 +3793,6 @@ const filledBackgroundAppearanceClasses = {
|
|
|
3795
3793
|
warning: "bg-(--color-bg-filled-warning)",
|
|
3796
3794
|
info: "bg-(--color-bg-filled-info)",
|
|
3797
3795
|
transparent: "bg-transparent",
|
|
3798
|
-
link: "bg-(--color-bg-filled-link)",
|
|
3799
3796
|
};
|
|
3800
3797
|
const filledHoverBackgroundAppearanceClasses = {
|
|
3801
3798
|
default: "hover:bg-(--color-bg-filled-hover-default)",
|
|
@@ -3808,7 +3805,6 @@ const filledHoverBackgroundAppearanceClasses = {
|
|
|
3808
3805
|
warning: "hover:bg-(--color-bg-filled-hover-warning)",
|
|
3809
3806
|
info: "hover:bg-(--color-bg-filled-hover-info)",
|
|
3810
3807
|
transparent: "hover:bg-transparent",
|
|
3811
|
-
link: "hover:bg-(--color-bg-filled-hover-link)",
|
|
3812
3808
|
};
|
|
3813
3809
|
const filledActiveBackgroundAppearanceClasses = {
|
|
3814
3810
|
default: "active:bg-(--color-bg-filled-active-default)",
|
|
@@ -3821,7 +3817,6 @@ const filledActiveBackgroundAppearanceClasses = {
|
|
|
3821
3817
|
warning: "active:bg-(--color-bg-filled-active-warning)",
|
|
3822
3818
|
info: "active:bg-(--color-bg-filled-active-info)",
|
|
3823
3819
|
transparent: "active:bg-transparent",
|
|
3824
|
-
link: "active:bg-(--color-bg-filled-active-link)",
|
|
3825
3820
|
};
|
|
3826
3821
|
const backgroundAppearanceClasses = {
|
|
3827
3822
|
default: "bg-(--color-bg-default)",
|
|
@@ -3834,7 +3829,6 @@ const backgroundAppearanceClasses = {
|
|
|
3834
3829
|
warning: "bg-(--color-bg-warning)",
|
|
3835
3830
|
info: "bg-(--color-bg-info)",
|
|
3836
3831
|
transparent: "bg-transparent",
|
|
3837
|
-
link: "bg-(--color-bg-link)",
|
|
3838
3832
|
};
|
|
3839
3833
|
const hoverBackgroundAppearanceClasses = {
|
|
3840
3834
|
default: "hover:bg-(--color-bg-hover-default)",
|
|
@@ -3847,7 +3841,6 @@ const hoverBackgroundAppearanceClasses = {
|
|
|
3847
3841
|
warning: "hover:bg-(--color-bg-hover-warning)",
|
|
3848
3842
|
info: "hover:bg-(--color-bg-hover-info)",
|
|
3849
3843
|
transparent: "hover:bg-transparent",
|
|
3850
|
-
link: "hover:bg-(--color-bg-hover-link)",
|
|
3851
3844
|
};
|
|
3852
3845
|
const activeBackgroundAppearanceClasses = {
|
|
3853
3846
|
default: "active:bg-(--color-bg-active-default)",
|
|
@@ -3860,7 +3853,6 @@ const activeBackgroundAppearanceClasses = {
|
|
|
3860
3853
|
warning: "active:bg-(--color-bg-active-warning)",
|
|
3861
3854
|
info: "active:bg-(--color-bg-active-info)",
|
|
3862
3855
|
transparent: "active:bg-transparent",
|
|
3863
|
-
link: "active:bg-(--color-bg-active-link)",
|
|
3864
3856
|
};
|
|
3865
3857
|
const layoutBackgroundAppearanceClasses = {
|
|
3866
3858
|
default: "bg-(--color-bg-layout-default)",
|
|
@@ -3873,7 +3865,6 @@ const layoutBackgroundAppearanceClasses = {
|
|
|
3873
3865
|
warning: "bg-(--color-bg-layout-warning)",
|
|
3874
3866
|
info: "bg-(--color-bg-layout-info)",
|
|
3875
3867
|
transparent: "bg-transparent",
|
|
3876
|
-
link: "bg-(--color-bg-layout-link)",
|
|
3877
3868
|
};
|
|
3878
3869
|
const layoutFilledBackgroundAppearanceClasses = {
|
|
3879
3870
|
default: "bg-(--color-bg-filled-layout-default)",
|
|
@@ -3886,7 +3877,6 @@ const layoutFilledBackgroundAppearanceClasses = {
|
|
|
3886
3877
|
warning: "bg-(--color-bg-filled-layout-warning)",
|
|
3887
3878
|
info: "bg-(--color-bg-filled-layout-info)",
|
|
3888
3879
|
transparent: "bg-transparent",
|
|
3889
|
-
link: "bg-(--color-bg-filled-layout-link)",
|
|
3890
3880
|
};
|
|
3891
3881
|
const bgBorderAppearanceClasses = {
|
|
3892
3882
|
default: "bg-(--color-border-default)",
|
|
@@ -3898,7 +3888,6 @@ const bgBorderAppearanceClasses = {
|
|
|
3898
3888
|
danger: "bg-(--color-border-danger)",
|
|
3899
3889
|
warning: "bg-(--color-border-warning)",
|
|
3900
3890
|
info: "bg-(--color-border-info)",
|
|
3901
|
-
link: "bg-(--color-border-link)",
|
|
3902
3891
|
transparent: "bg-transparent",
|
|
3903
3892
|
};
|
|
3904
3893
|
const borderAppearanceClasses = {
|
|
@@ -3911,7 +3900,6 @@ const borderAppearanceClasses = {
|
|
|
3911
3900
|
danger: "border-(--color-border-danger)",
|
|
3912
3901
|
warning: "border-(--color-border-warning)",
|
|
3913
3902
|
info: "border-(--color-border-info)",
|
|
3914
|
-
link: "border-(--color-border-link)",
|
|
3915
3903
|
transparent: "border-transparent",
|
|
3916
3904
|
};
|
|
3917
3905
|
const filledBorderAppearanceClasses = {
|
|
@@ -3924,7 +3912,6 @@ const filledBorderAppearanceClasses = {
|
|
|
3924
3912
|
danger: "border-(--color-border-filled-danger)",
|
|
3925
3913
|
warning: "border-(--color-border-filled-warning)",
|
|
3926
3914
|
info: "border-(--color-border-filled-info)",
|
|
3927
|
-
link: "border-(--color-border-filled-link)",
|
|
3928
3915
|
transparent: "border-transparent",
|
|
3929
3916
|
};
|
|
3930
3917
|
const ringAppearanceClasses = {
|
|
@@ -3937,7 +3924,6 @@ const ringAppearanceClasses = {
|
|
|
3937
3924
|
danger: "ring-(--color-border-danger)",
|
|
3938
3925
|
warning: "ring-(--color-border-warning)",
|
|
3939
3926
|
info: "ring-(--color-border-info)",
|
|
3940
|
-
link: "ring-(--color-border-link)",
|
|
3941
3927
|
transparent: "ring-transparent",
|
|
3942
3928
|
};
|
|
3943
3929
|
const filledRingAppearanceClasses = {
|
|
@@ -3950,7 +3936,6 @@ const filledRingAppearanceClasses = {
|
|
|
3950
3936
|
danger: "ring-(--color-border-filled-danger)",
|
|
3951
3937
|
warning: "ring-(--color-border-filled-warning)",
|
|
3952
3938
|
info: "ring-(--color-border-filled-info)",
|
|
3953
|
-
link: "ring-(--color-border-filled-link)",
|
|
3954
3939
|
transparent: "ring-transparent",
|
|
3955
3940
|
};
|
|
3956
3941
|
const focusVisibleOutlineAppearanceClasses = {
|
|
@@ -3963,7 +3948,6 @@ const focusVisibleOutlineAppearanceClasses = {
|
|
|
3963
3948
|
danger: "focus-visible:outline-(--color-border-danger)",
|
|
3964
3949
|
warning: "focus-visible:outline-(--color-border-warning)",
|
|
3965
3950
|
info: "focus-visible:outline-(--color-border-info)",
|
|
3966
|
-
link: "focus-visible:outline-(--color-border-link)",
|
|
3967
3951
|
transparent: "focus-visible:outline-transparent",
|
|
3968
3952
|
};
|
|
3969
3953
|
const filledFocusVisibleOutlineAppearanceClasses = {
|
|
@@ -3976,7 +3960,6 @@ const filledFocusVisibleOutlineAppearanceClasses = {
|
|
|
3976
3960
|
danger: "focus-visible:outline-(--color-border-filled-danger)",
|
|
3977
3961
|
warning: "focus-visible:outline-(--color-border-filled-warning)",
|
|
3978
3962
|
info: "focus-visible:outline-(--color-border-filled-info)",
|
|
3979
|
-
link: "focus-visible:outline-(--color-border-filled-link)",
|
|
3980
3963
|
transparent: "focus-visible:outline-transparent",
|
|
3981
3964
|
};
|
|
3982
3965
|
const accentColorAppearanceClasses = {
|
|
@@ -3990,7 +3973,6 @@ const accentColorAppearanceClasses = {
|
|
|
3990
3973
|
warning: "accent-(--color-bg-warning)",
|
|
3991
3974
|
info: "accent-(--color-bg-info)",
|
|
3992
3975
|
transparent: "accent-transparent",
|
|
3993
|
-
link: "accent-(--color-bg-link)",
|
|
3994
3976
|
};
|
|
3995
3977
|
const filledAccentColorAppearanceClasses = {
|
|
3996
3978
|
default: "accent-(--color-bg-filled-default)",
|
|
@@ -4003,7 +3985,6 @@ const filledAccentColorAppearanceClasses = {
|
|
|
4003
3985
|
warning: "accent-(--color-bg-filled-warning)",
|
|
4004
3986
|
info: "accent-(--color-bg-filled-info)",
|
|
4005
3987
|
transparent: "accent-transparent",
|
|
4006
|
-
link: "accent-(--color-bg-filled-link)",
|
|
4007
3988
|
};
|
|
4008
3989
|
const checkedBackgroundAppearanceClasses = {
|
|
4009
3990
|
default: "checked:bg-(--color-bg-default)",
|
|
@@ -4016,7 +3997,6 @@ const checkedBackgroundAppearanceClasses = {
|
|
|
4016
3997
|
warning: "checked:bg-(--color-bg-warning)",
|
|
4017
3998
|
info: "checked:bg-(--color-bg-info)",
|
|
4018
3999
|
transparent: "checked:bg-transparent",
|
|
4019
|
-
link: "checked:bg-(--color-bg-link)",
|
|
4020
4000
|
};
|
|
4021
4001
|
const filledCheckedBackgroundAppearanceClasses = {
|
|
4022
4002
|
default: "checked:bg-(--color-bg-filled-default)",
|
|
@@ -4029,7 +4009,6 @@ const filledCheckedBackgroundAppearanceClasses = {
|
|
|
4029
4009
|
warning: "checked:bg-(--color-bg-filled-warning)",
|
|
4030
4010
|
info: "checked:bg-(--color-bg-filled-info)",
|
|
4031
4011
|
transparent: "checked:bg-transparent",
|
|
4032
|
-
link: "checked:bg-(--color-bg-filled-link)",
|
|
4033
4012
|
};
|
|
4034
4013
|
|
|
4035
4014
|
class ShadowAppearanceTheme extends BaseTheme {
|
|
@@ -4470,7 +4449,6 @@ const themeDefaults = {
|
|
|
4470
4449
|
},
|
|
4471
4450
|
link: {
|
|
4472
4451
|
underline: true,
|
|
4473
|
-
link: true,
|
|
4474
4452
|
sans: true,
|
|
4475
4453
|
},
|
|
4476
4454
|
listItem: {
|
|
@@ -4709,6 +4687,32 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
|
|
|
4709
4687
|
typography: defaultTypographyThemes,
|
|
4710
4688
|
}, themeDefaults.code, CODE_CATEGORIES);
|
|
4711
4689
|
|
|
4690
|
+
/**
|
|
4691
|
+
* Link-specific variant theme that handles text colors
|
|
4692
|
+
* using link color variables directly (not through the appearance system).
|
|
4693
|
+
*
|
|
4694
|
+
* This allows Link component colors to be customized independently
|
|
4695
|
+
* from primary/secondary appearance colors.
|
|
4696
|
+
*/
|
|
4697
|
+
class LinkVariantTheme extends BaseTheme {
|
|
4698
|
+
constructor() {
|
|
4699
|
+
super(...arguments);
|
|
4700
|
+
/** Text color for outline/default links (light backgrounds) */
|
|
4701
|
+
this.outline = "text-(--color-text-link)";
|
|
4702
|
+
/** Text color for filled links (dark backgrounds) */
|
|
4703
|
+
this.filled = "text-(--color-text-filled-link)";
|
|
4704
|
+
}
|
|
4705
|
+
getClasses(extractedKeys) {
|
|
4706
|
+
var _a;
|
|
4707
|
+
// Handle transparent override
|
|
4708
|
+
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.transparent) === 'transparent') {
|
|
4709
|
+
return ['text-transparent'];
|
|
4710
|
+
}
|
|
4711
|
+
const variant = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.variant) !== null && _a !== void 0 ? _a : 'outline';
|
|
4712
|
+
return [this[variant] || ''];
|
|
4713
|
+
}
|
|
4714
|
+
}
|
|
4715
|
+
|
|
4712
4716
|
const isObject = (item) => {
|
|
4713
4717
|
return item !== null && typeof item === 'object' && !Array.isArray(item);
|
|
4714
4718
|
};
|
|
@@ -4843,14 +4847,14 @@ const sectionTitleTheme = createTypographyComponentTheme("h2", "text-balance w-f
|
|
|
4843
4847
|
const titleTheme = createTypographyComponentTheme("h3", "text-balance w-fit", FontSizeTheme.createForTitle(), mergeDefaults(themeDefaults.title, { semibold: true }), LineHeightTheme.createForTitle());
|
|
4844
4848
|
// Text specific theme
|
|
4845
4849
|
const textTheme = createTypographyComponentTheme("p", "p-0 m-0 w-fit", new FontSizeTheme(), themeDefaults.text);
|
|
4846
|
-
// Link specific theme
|
|
4850
|
+
// Link specific theme - uses LinkVariantTheme for link-specific colors
|
|
4847
4851
|
const linkTheme = new ComponentTheme("a", "hover:underline w-fit cursor-pointer", {
|
|
4848
4852
|
size: {
|
|
4849
4853
|
text: new FontSizeTheme(),
|
|
4850
4854
|
lineHeight: LineHeightTheme.createDefault(),
|
|
4851
4855
|
},
|
|
4852
4856
|
appearance: {
|
|
4853
|
-
text:
|
|
4857
|
+
text: new LinkVariantTheme(),
|
|
4854
4858
|
},
|
|
4855
4859
|
typography: defaultTypographyThemes,
|
|
4856
4860
|
layout: defaultLayoutsThemes,
|