@vaneui/ui 0.3.1-alpha.20250917170051.b819c80 → 0.3.1-alpha.20250921204254.9cfeae4
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/classes/layoutClasses.d.ts +2 -4
- package/dist/components/ui/classes/layoutClasses.d.ts.map +1 -1
- package/dist/components/ui/theme/cardTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/colTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/containerTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/gridTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/rowTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/sectionTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/pxTheme.d.ts +4 -1
- package/dist/components/ui/theme/size/pxTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/pyTheme.d.ts +2 -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 +103 -44
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +103 -44
- package/dist/index.js.map +1 -1
- package/dist/ui.css +90 -122
- package/dist/vars.css +20 -41
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3680,39 +3680,25 @@ class SizeTheme extends BaseTheme {
|
|
|
3680
3680
|
}
|
|
3681
3681
|
|
|
3682
3682
|
const layoutGapClasses = {
|
|
3683
|
-
xs: "
|
|
3684
|
-
sm: "
|
|
3685
|
-
md: "
|
|
3686
|
-
lg: "
|
|
3687
|
-
xl: "
|
|
3683
|
+
xs: "[--gap-unit:2]",
|
|
3684
|
+
sm: "[--gap-unit:3]",
|
|
3685
|
+
md: "[--gap-unit:4]",
|
|
3686
|
+
lg: "[--gap-unit:5]",
|
|
3687
|
+
xl: "[--gap-unit:6]",
|
|
3688
3688
|
};
|
|
3689
|
-
const
|
|
3690
|
-
xs: "
|
|
3691
|
-
sm: "
|
|
3692
|
-
md: "
|
|
3693
|
-
lg: "
|
|
3694
|
-
xl: "
|
|
3689
|
+
const layoutPaddingClasses = {
|
|
3690
|
+
xs: "[--h-unit:2]",
|
|
3691
|
+
sm: "[--h-unit:3]",
|
|
3692
|
+
md: "[--h-unit:4]",
|
|
3693
|
+
lg: "[--h-unit:5]",
|
|
3694
|
+
xl: "[--h-unit:6]",
|
|
3695
3695
|
};
|
|
3696
|
-
const
|
|
3697
|
-
xs: "
|
|
3698
|
-
sm: "
|
|
3699
|
-
md: "
|
|
3700
|
-
lg: "
|
|
3701
|
-
xl: "
|
|
3702
|
-
};
|
|
3703
|
-
const sectionPaddingXClasses = {
|
|
3704
|
-
xs: "px-(--section-px-xs)",
|
|
3705
|
-
sm: "px-(--section-px-sm)",
|
|
3706
|
-
md: "px-(--section-px-md)",
|
|
3707
|
-
lg: "px-(--section-px-lg)",
|
|
3708
|
-
xl: "px-(--section-px-xl)",
|
|
3709
|
-
};
|
|
3710
|
-
const sectionPaddingYClasses = {
|
|
3711
|
-
xs: "py-(--section-py-xs)",
|
|
3712
|
-
sm: "py-(--section-py-sm)",
|
|
3713
|
-
md: "py-(--section-py-md)",
|
|
3714
|
-
lg: "py-(--section-py-lg)",
|
|
3715
|
-
xl: "py-(--section-py-xl)",
|
|
3696
|
+
const sectionAspectRatioClasses = {
|
|
3697
|
+
xs: "[--aspect-ratio:2.5]",
|
|
3698
|
+
sm: "[--aspect-ratio:2]",
|
|
3699
|
+
md: "[--aspect-ratio:1.75]",
|
|
3700
|
+
lg: "[--aspect-ratio:1.6]",
|
|
3701
|
+
xl: "[--aspect-ratio:1.5]",
|
|
3716
3702
|
};
|
|
3717
3703
|
|
|
3718
3704
|
class GapTheme extends BaseTheme {
|
|
@@ -3740,7 +3726,7 @@ class GapTheme extends BaseTheme {
|
|
|
3740
3726
|
var _a;
|
|
3741
3727
|
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.gap) === 'gap') {
|
|
3742
3728
|
const gapClass = this[(_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md'];
|
|
3743
|
-
return gapClass ? [gapClass] : [];
|
|
3729
|
+
return gapClass ? [gapClass, "gap-(--gap)"] : [];
|
|
3744
3730
|
}
|
|
3745
3731
|
return [];
|
|
3746
3732
|
}
|
|
@@ -3904,15 +3890,32 @@ class PaddingTheme extends BaseTheme {
|
|
|
3904
3890
|
|
|
3905
3891
|
/** Horizontal padding theme - controls left and right padding */
|
|
3906
3892
|
class PxTheme extends PaddingTheme {
|
|
3907
|
-
constructor(sizeMap) {
|
|
3893
|
+
constructor(sizeMap, aspectRatioMap) {
|
|
3908
3894
|
super(sizeMap);
|
|
3895
|
+
this.aspectRatioMap = aspectRatioMap;
|
|
3909
3896
|
// Override with PxTheme's default classes if no custom sizeMap provided
|
|
3910
3897
|
if (!sizeMap) {
|
|
3911
3898
|
ComponentKeys.size.forEach((key) => {
|
|
3912
|
-
this[key] =
|
|
3899
|
+
this[key] = layoutPaddingClasses[key];
|
|
3913
3900
|
});
|
|
3914
3901
|
}
|
|
3915
3902
|
}
|
|
3903
|
+
getClasses(extractedKeys) {
|
|
3904
|
+
var _a, _b;
|
|
3905
|
+
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
|
|
3906
|
+
const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
|
|
3907
|
+
const paddingClass = this[size];
|
|
3908
|
+
const aspectRatioClass = (_b = this.aspectRatioMap) === null || _b === void 0 ? void 0 : _b[size];
|
|
3909
|
+
const classes = [];
|
|
3910
|
+
if (paddingClass)
|
|
3911
|
+
classes.push(paddingClass);
|
|
3912
|
+
if (aspectRatioClass)
|
|
3913
|
+
classes.push(aspectRatioClass);
|
|
3914
|
+
classes.push("px-(--px)");
|
|
3915
|
+
return classes.length > 1 ? classes : [];
|
|
3916
|
+
}
|
|
3917
|
+
return [];
|
|
3918
|
+
}
|
|
3916
3919
|
}
|
|
3917
3920
|
|
|
3918
3921
|
/** Vertical padding theme - controls top and bottom padding */
|
|
@@ -3922,10 +3925,18 @@ class PyTheme extends PaddingTheme {
|
|
|
3922
3925
|
// Override with PyTheme's default classes if no custom sizeMap provided
|
|
3923
3926
|
if (!sizeMap) {
|
|
3924
3927
|
ComponentKeys.size.forEach((key) => {
|
|
3925
|
-
this[key] =
|
|
3928
|
+
this[key] = layoutPaddingClasses[key];
|
|
3926
3929
|
});
|
|
3927
3930
|
}
|
|
3928
3931
|
}
|
|
3932
|
+
getClasses(extractedKeys) {
|
|
3933
|
+
var _a;
|
|
3934
|
+
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
|
|
3935
|
+
const paddingClass = this[(_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md'];
|
|
3936
|
+
return paddingClass ? [paddingClass, "py-(--py)"] : [];
|
|
3937
|
+
}
|
|
3938
|
+
return [];
|
|
3939
|
+
}
|
|
3929
3940
|
}
|
|
3930
3941
|
|
|
3931
3942
|
class AppearanceTheme extends BaseTheme {
|
|
@@ -5087,7 +5098,13 @@ const defaultCardTheme = new ComponentTheme("div", "", {
|
|
|
5087
5098
|
size: {
|
|
5088
5099
|
px: new PxTheme(),
|
|
5089
5100
|
py: new PyTheme(),
|
|
5090
|
-
gap: new GapTheme(
|
|
5101
|
+
gap: new GapTheme({
|
|
5102
|
+
xs: "[--gap-unit:1]",
|
|
5103
|
+
sm: "[--gap-unit:1.5]",
|
|
5104
|
+
md: "[--gap-unit:2]",
|
|
5105
|
+
lg: "[--gap-unit:2.5]",
|
|
5106
|
+
xl: "[--gap-unit:3]",
|
|
5107
|
+
}),
|
|
5091
5108
|
},
|
|
5092
5109
|
layout: {
|
|
5093
5110
|
...defaultLayoutsThemes,
|
|
@@ -5110,7 +5127,13 @@ const defaultCardTheme = new ComponentTheme("div", "", {
|
|
|
5110
5127
|
|
|
5111
5128
|
const defaultRowTheme = new ComponentTheme("div", "", {
|
|
5112
5129
|
size: {
|
|
5113
|
-
gap: new GapTheme(
|
|
5130
|
+
gap: new GapTheme({
|
|
5131
|
+
xs: "[--gap-unit:2]",
|
|
5132
|
+
sm: "[--gap-unit:3]",
|
|
5133
|
+
md: "[--gap-unit:4]",
|
|
5134
|
+
lg: "[--gap-unit:5]",
|
|
5135
|
+
xl: "[--gap-unit:6]",
|
|
5136
|
+
}),
|
|
5114
5137
|
breakpoint: new BreakpointTheme(),
|
|
5115
5138
|
},
|
|
5116
5139
|
layout: {
|
|
@@ -5144,7 +5167,13 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
|
|
|
5144
5167
|
|
|
5145
5168
|
const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
|
|
5146
5169
|
size: {
|
|
5147
|
-
gap: new GapTheme(
|
|
5170
|
+
gap: new GapTheme({
|
|
5171
|
+
xs: "[--gap-unit:2]",
|
|
5172
|
+
sm: "[--gap-unit:3]",
|
|
5173
|
+
md: "[--gap-unit:4]",
|
|
5174
|
+
lg: "[--gap-unit:5]",
|
|
5175
|
+
xl: "[--gap-unit:6]",
|
|
5176
|
+
}),
|
|
5148
5177
|
maxWidth: new SizeTheme({ xs: 'max-w-3xl', sm: 'max-w-4xl', md: 'max-w-5xl', lg: 'max-w-6xl', xl: 'max-w-7xl' }),
|
|
5149
5178
|
},
|
|
5150
5179
|
layout: {
|
|
@@ -5166,7 +5195,13 @@ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full
|
|
|
5166
5195
|
|
|
5167
5196
|
const defaultColTheme = new ComponentTheme("div", "", {
|
|
5168
5197
|
size: {
|
|
5169
|
-
gap: new GapTheme(
|
|
5198
|
+
gap: new GapTheme({
|
|
5199
|
+
xs: "[--gap-unit:2]",
|
|
5200
|
+
sm: "[--gap-unit:3]",
|
|
5201
|
+
md: "[--gap-unit:4]",
|
|
5202
|
+
lg: "[--gap-unit:5]",
|
|
5203
|
+
xl: "[--gap-unit:6]",
|
|
5204
|
+
}),
|
|
5170
5205
|
},
|
|
5171
5206
|
layout: {
|
|
5172
5207
|
...defaultLayoutsThemes,
|
|
@@ -5189,7 +5224,13 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
5189
5224
|
size: {
|
|
5190
5225
|
px: new PxTheme(),
|
|
5191
5226
|
py: new PyTheme(),
|
|
5192
|
-
gap: new GapTheme(
|
|
5227
|
+
gap: new GapTheme({
|
|
5228
|
+
xs: "[--gap-unit:2]",
|
|
5229
|
+
sm: "[--gap-unit:3]",
|
|
5230
|
+
md: "[--gap-unit:4]",
|
|
5231
|
+
lg: "[--gap-unit:5]",
|
|
5232
|
+
xl: "[--gap-unit:6]",
|
|
5233
|
+
}),
|
|
5193
5234
|
breakpoint: new BreakpointTheme(),
|
|
5194
5235
|
},
|
|
5195
5236
|
layout: {
|
|
@@ -5211,9 +5252,21 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
5211
5252
|
|
|
5212
5253
|
const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
|
|
5213
5254
|
size: {
|
|
5214
|
-
px: new PxTheme(
|
|
5215
|
-
py: new PyTheme(
|
|
5216
|
-
|
|
5255
|
+
px: new PxTheme(layoutPaddingClasses, sectionAspectRatioClasses),
|
|
5256
|
+
py: new PyTheme({
|
|
5257
|
+
xs: "[--h-unit:4]",
|
|
5258
|
+
sm: "[--h-unit:8]",
|
|
5259
|
+
md: "[--h-unit:12]",
|
|
5260
|
+
lg: "[--h-unit:16]",
|
|
5261
|
+
xl: "[--h-unit:20]",
|
|
5262
|
+
}),
|
|
5263
|
+
gap: new GapTheme({
|
|
5264
|
+
xs: "[--gap-unit:2]",
|
|
5265
|
+
sm: "[--gap-unit:3]",
|
|
5266
|
+
md: "[--gap-unit:4]",
|
|
5267
|
+
lg: "[--gap-unit:5]",
|
|
5268
|
+
xl: "[--gap-unit:6]",
|
|
5269
|
+
}),
|
|
5217
5270
|
breakpoint: new BreakpointTheme(),
|
|
5218
5271
|
},
|
|
5219
5272
|
appearance: {
|
|
@@ -5235,7 +5288,13 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
|
|
|
5235
5288
|
|
|
5236
5289
|
const gridSubThemes = {
|
|
5237
5290
|
size: {
|
|
5238
|
-
gap: new GapTheme(
|
|
5291
|
+
gap: new GapTheme({
|
|
5292
|
+
xs: "[--gap-unit:2]",
|
|
5293
|
+
sm: "[--gap-unit:3]",
|
|
5294
|
+
md: "[--gap-unit:4]",
|
|
5295
|
+
lg: "[--gap-unit:5]",
|
|
5296
|
+
xl: "[--gap-unit:6]",
|
|
5297
|
+
}),
|
|
5239
5298
|
},
|
|
5240
5299
|
appearance: {
|
|
5241
5300
|
background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
|