@vaneui/ui 0.3.1-alpha.20251110140105.0a5a63e → 0.3.1-alpha.20251110144303.5af7508
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/theme/badgeTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/buttonTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/inputTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/gapTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/pxTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/pyTheme.d.ts +1 -0
- package/dist/components/ui/theme/size/pyTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/stackTheme.d.ts.map +1 -1
- package/dist/index.esm.js +48 -38
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +48 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/ui/classes/layoutClasses.d.ts +0 -6
- package/dist/components/ui/classes/layoutClasses.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -3766,42 +3766,25 @@ class LineHeightTheme extends BaseTheme {
|
|
|
3766
3766
|
}
|
|
3767
3767
|
}
|
|
3768
3768
|
|
|
3769
|
-
// Reusable layout classes used by multiple components
|
|
3770
|
-
const layoutGapClasses = {
|
|
3771
|
-
xs: "[--gap-unit:2]",
|
|
3772
|
-
sm: "[--gap-unit:3]",
|
|
3773
|
-
md: "[--gap-unit:4]",
|
|
3774
|
-
lg: "[--gap-unit:5]",
|
|
3775
|
-
xl: "[--gap-unit:6]",
|
|
3776
|
-
};
|
|
3777
|
-
const layoutPaddingClasses = {
|
|
3778
|
-
xs: "[--py-unit:2]",
|
|
3779
|
-
sm: "[--py-unit:3]",
|
|
3780
|
-
md: "[--py-unit:4]",
|
|
3781
|
-
lg: "[--py-unit:5]",
|
|
3782
|
-
xl: "[--py-unit:6]",
|
|
3783
|
-
};
|
|
3784
|
-
// Reusable UI component classes used by multiple components
|
|
3785
|
-
const uiPaddingClasses = {
|
|
3786
|
-
xs: "[--py-unit:1]",
|
|
3787
|
-
sm: "[--py-unit:1.5]",
|
|
3788
|
-
md: "[--py-unit:2]",
|
|
3789
|
-
lg: "[--py-unit:2.5]",
|
|
3790
|
-
xl: "[--py-unit:3]",
|
|
3791
|
-
};
|
|
3792
|
-
const uiGapClasses = {
|
|
3793
|
-
xs: "[--gap-unit:1]",
|
|
3794
|
-
sm: "[--gap-unit:1.5]",
|
|
3795
|
-
md: "[--gap-unit:2]",
|
|
3796
|
-
lg: "[--gap-unit:2.5]",
|
|
3797
|
-
xl: "[--gap-unit:3]",
|
|
3798
|
-
};
|
|
3799
|
-
|
|
3800
3769
|
class GapTheme extends BaseTheme {
|
|
3801
3770
|
constructor(isUIComponent = false) {
|
|
3802
3771
|
super();
|
|
3803
3772
|
this.gapVarClass = isUIComponent ? "gap-(--ui-gap)" : "gap-(--gap)";
|
|
3804
|
-
const gapClasses = isUIComponent
|
|
3773
|
+
const gapClasses = isUIComponent
|
|
3774
|
+
? {
|
|
3775
|
+
xs: "[--gap-unit:1]",
|
|
3776
|
+
sm: "[--gap-unit:1.5]",
|
|
3777
|
+
md: "[--gap-unit:2]",
|
|
3778
|
+
lg: "[--gap-unit:2.5]",
|
|
3779
|
+
xl: "[--gap-unit:3]",
|
|
3780
|
+
}
|
|
3781
|
+
: {
|
|
3782
|
+
xs: "[--gap-unit:2]",
|
|
3783
|
+
sm: "[--gap-unit:3]",
|
|
3784
|
+
md: "[--gap-unit:4]",
|
|
3785
|
+
lg: "[--gap-unit:5]",
|
|
3786
|
+
xl: "[--gap-unit:6]",
|
|
3787
|
+
};
|
|
3805
3788
|
this.xs = gapClasses.xs;
|
|
3806
3789
|
this.sm = gapClasses.sm;
|
|
3807
3790
|
this.md = gapClasses.md;
|
|
@@ -3987,7 +3970,13 @@ class PaddingTheme extends BaseTheme {
|
|
|
3987
3970
|
class PxTheme extends PaddingTheme {
|
|
3988
3971
|
constructor(aspectRatio, isUIComponent = false) {
|
|
3989
3972
|
super();
|
|
3990
|
-
this.aspectRatioMap = aspectRatio
|
|
3973
|
+
this.aspectRatioMap = aspectRatio ? aspectRatio : {
|
|
3974
|
+
xs: "[--aspect-ratio:1]",
|
|
3975
|
+
sm: "[--aspect-ratio:1]",
|
|
3976
|
+
md: "[--aspect-ratio:1]",
|
|
3977
|
+
lg: "[--aspect-ratio:1]",
|
|
3978
|
+
xl: "[--aspect-ratio:1]",
|
|
3979
|
+
};
|
|
3991
3980
|
this.isUIComponent = isUIComponent;
|
|
3992
3981
|
// PxTheme should not set any padding classes - that's PyTheme's job
|
|
3993
3982
|
// PxTheme only handles aspect-ratio
|
|
@@ -4018,7 +4007,13 @@ class PyTheme extends PaddingTheme {
|
|
|
4018
4007
|
// Override with PyTheme's default classes if no custom sizeMap provided
|
|
4019
4008
|
if (!sizeMap) {
|
|
4020
4009
|
ComponentKeys.size.forEach((key) => {
|
|
4021
|
-
this[key] =
|
|
4010
|
+
this[key] = {
|
|
4011
|
+
xs: "[--py-unit:2]",
|
|
4012
|
+
sm: "[--py-unit:3]",
|
|
4013
|
+
md: "[--py-unit:4]",
|
|
4014
|
+
lg: "[--py-unit:5]",
|
|
4015
|
+
xl: "[--py-unit:6]",
|
|
4016
|
+
}[key];
|
|
4022
4017
|
});
|
|
4023
4018
|
}
|
|
4024
4019
|
}
|
|
@@ -4034,6 +4029,15 @@ class PyTheme extends PaddingTheme {
|
|
|
4034
4029
|
}
|
|
4035
4030
|
return [];
|
|
4036
4031
|
}
|
|
4032
|
+
static createForUI() {
|
|
4033
|
+
return new PyTheme({
|
|
4034
|
+
xs: "[--py-unit:1]",
|
|
4035
|
+
sm: "[--py-unit:1.5]",
|
|
4036
|
+
md: "[--py-unit:2]",
|
|
4037
|
+
lg: "[--py-unit:2.5]",
|
|
4038
|
+
xl: "[--py-unit:3]",
|
|
4039
|
+
}, true);
|
|
4040
|
+
}
|
|
4037
4041
|
}
|
|
4038
4042
|
|
|
4039
4043
|
class AppearanceTheme extends BaseTheme {
|
|
@@ -4876,7 +4880,7 @@ const buttonAspectRatioClasses = {
|
|
|
4876
4880
|
const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
|
|
4877
4881
|
size: {
|
|
4878
4882
|
px: new PxTheme(buttonAspectRatioClasses, true),
|
|
4879
|
-
py:
|
|
4883
|
+
py: PyTheme.createForUI(),
|
|
4880
4884
|
gap: new GapTheme(true),
|
|
4881
4885
|
text: new FontSizeTheme(),
|
|
4882
4886
|
lineHeight: new LineHeightTheme({
|
|
@@ -4921,7 +4925,7 @@ const badgeAspectRatioClasses = {
|
|
|
4921
4925
|
const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
|
|
4922
4926
|
size: {
|
|
4923
4927
|
px: new PxTheme(badgeAspectRatioClasses, true),
|
|
4924
|
-
py:
|
|
4928
|
+
py: PyTheme.createForUI(),
|
|
4925
4929
|
gap: new GapTheme(true),
|
|
4926
4930
|
text: new FontSizeTheme(),
|
|
4927
4931
|
lineHeight: LineHeightTheme.createDefault()
|
|
@@ -5377,7 +5381,13 @@ const defaultColTheme = new ComponentTheme("div", "", {
|
|
|
5377
5381
|
|
|
5378
5382
|
const defaultStackTheme = new ComponentTheme("div", "", {
|
|
5379
5383
|
size: {
|
|
5380
|
-
px: new PxTheme(
|
|
5384
|
+
px: new PxTheme({
|
|
5385
|
+
xs: "[--aspect-ratio:1]",
|
|
5386
|
+
sm: "[--aspect-ratio:1]",
|
|
5387
|
+
md: "[--aspect-ratio:1]",
|
|
5388
|
+
lg: "[--aspect-ratio:1]",
|
|
5389
|
+
xl: "[--aspect-ratio:1]",
|
|
5390
|
+
}),
|
|
5381
5391
|
py: new PyTheme(),
|
|
5382
5392
|
gap: new GapTheme(),
|
|
5383
5393
|
breakpoint: new BreakpointTheme(),
|
|
@@ -5559,7 +5569,7 @@ const defaultInputTheme = new ComponentTheme("input", "w-full transition-all dur
|
|
|
5559
5569
|
lg: "[--aspect-ratio:2]",
|
|
5560
5570
|
xl: "[--aspect-ratio:2]",
|
|
5561
5571
|
}, true),
|
|
5562
|
-
py:
|
|
5572
|
+
py: PyTheme.createForUI(),
|
|
5563
5573
|
gap: new GapTheme(true),
|
|
5564
5574
|
text: new FontSizeTheme(),
|
|
5565
5575
|
lineHeight: LineHeightTheme.createDefault(),
|