@vaneui/ui 0.3.1-alpha.20251110144303.5af7508 → 0.3.1-alpha.20251115130358.c59f986
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/defaults.d.ts.map +1 -1
- package/dist/components/ui/theme/layout/radiusTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/sectionTheme.d.ts.map +1 -1
- package/dist/components/ui/theme/size/gapTheme.d.ts +3 -1
- package/dist/components/ui/theme/size/gapTheme.d.ts.map +1 -1
- package/dist/index.esm.js +64 -57
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +64 -57
- package/dist/index.js.map +1 -1
- package/dist/ui.css +82 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3767,24 +3767,9 @@ class LineHeightTheme extends BaseTheme {
|
|
|
3767
3767
|
}
|
|
3768
3768
|
|
|
3769
3769
|
class GapTheme extends BaseTheme {
|
|
3770
|
-
constructor(isUIComponent = false) {
|
|
3770
|
+
constructor(gapClasses, isUIComponent = false) {
|
|
3771
3771
|
super();
|
|
3772
3772
|
this.gapVarClass = isUIComponent ? "gap-(--ui-gap)" : "gap-(--gap)";
|
|
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
|
-
};
|
|
3788
3773
|
this.xs = gapClasses.xs;
|
|
3789
3774
|
this.sm = gapClasses.sm;
|
|
3790
3775
|
this.md = gapClasses.md;
|
|
@@ -3799,6 +3784,24 @@ class GapTheme extends BaseTheme {
|
|
|
3799
3784
|
}
|
|
3800
3785
|
return [];
|
|
3801
3786
|
}
|
|
3787
|
+
static createForUI() {
|
|
3788
|
+
return new GapTheme({
|
|
3789
|
+
xs: "[--gap-unit:1]",
|
|
3790
|
+
sm: "[--gap-unit:1.5]",
|
|
3791
|
+
md: "[--gap-unit:2]",
|
|
3792
|
+
lg: "[--gap-unit:2.5]",
|
|
3793
|
+
xl: "[--gap-unit:3]",
|
|
3794
|
+
}, true);
|
|
3795
|
+
}
|
|
3796
|
+
static createForLayout() {
|
|
3797
|
+
return new GapTheme({
|
|
3798
|
+
xs: "[--gap-unit:2]",
|
|
3799
|
+
sm: "[--gap-unit:3]",
|
|
3800
|
+
md: "[--gap-unit:4]",
|
|
3801
|
+
lg: "[--gap-unit:5]",
|
|
3802
|
+
xl: "[--gap-unit:6]",
|
|
3803
|
+
}, false);
|
|
3804
|
+
}
|
|
3802
3805
|
}
|
|
3803
3806
|
|
|
3804
3807
|
class RadiusTheme extends BaseTheme {
|
|
@@ -3840,22 +3843,25 @@ class RadiusTheme extends BaseTheme {
|
|
|
3840
3843
|
return new RadiusTheme(brUnitClasses, false);
|
|
3841
3844
|
}
|
|
3842
3845
|
getClasses(extractedKeys) {
|
|
3843
|
-
var _a
|
|
3846
|
+
var _a;
|
|
3844
3847
|
const size = (_a = extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
|
|
3845
|
-
const shape =
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3848
|
+
const shape = extractedKeys.shape;
|
|
3849
|
+
if (shape) {
|
|
3850
|
+
switch (shape) {
|
|
3851
|
+
case 'pill':
|
|
3852
|
+
return [this.pill];
|
|
3853
|
+
case 'sharp':
|
|
3854
|
+
return [this.sharp];
|
|
3855
|
+
case 'rounded': {
|
|
3856
|
+
const brUnitClass = this.rounded[size];
|
|
3857
|
+
const roundedVar = this.isUIComponent ? "rounded-(--ui-br)" : "rounded-(--br)";
|
|
3858
|
+
return brUnitClass ? [brUnitClass, roundedVar] : [];
|
|
3859
|
+
}
|
|
3860
|
+
default:
|
|
3861
|
+
return [];
|
|
3855
3862
|
}
|
|
3856
|
-
default:
|
|
3857
|
-
return [];
|
|
3858
3863
|
}
|
|
3864
|
+
return [];
|
|
3859
3865
|
}
|
|
3860
3866
|
}
|
|
3861
3867
|
|
|
@@ -4699,7 +4705,6 @@ const themeDefaults = {
|
|
|
4699
4705
|
md: true,
|
|
4700
4706
|
itemsCenter: true,
|
|
4701
4707
|
gap: true,
|
|
4702
|
-
sharp: true,
|
|
4703
4708
|
},
|
|
4704
4709
|
section: {
|
|
4705
4710
|
md: true,
|
|
@@ -4712,7 +4717,6 @@ const themeDefaults = {
|
|
|
4712
4717
|
noBorder: true,
|
|
4713
4718
|
noRing: true,
|
|
4714
4719
|
noShadow: true,
|
|
4715
|
-
sharp: true,
|
|
4716
4720
|
},
|
|
4717
4721
|
stack: {
|
|
4718
4722
|
md: true,
|
|
@@ -4723,7 +4727,6 @@ const themeDefaults = {
|
|
|
4723
4727
|
padding: true,
|
|
4724
4728
|
noBorder: true,
|
|
4725
4729
|
noRing: true,
|
|
4726
|
-
sharp: true,
|
|
4727
4730
|
},
|
|
4728
4731
|
row: {
|
|
4729
4732
|
row: true,
|
|
@@ -4733,7 +4736,6 @@ const themeDefaults = {
|
|
|
4733
4736
|
gap: true,
|
|
4734
4737
|
noBorder: true,
|
|
4735
4738
|
noRing: true,
|
|
4736
|
-
sharp: true,
|
|
4737
4739
|
},
|
|
4738
4740
|
col: {
|
|
4739
4741
|
column: true,
|
|
@@ -4742,7 +4744,6 @@ const themeDefaults = {
|
|
|
4742
4744
|
gap: true,
|
|
4743
4745
|
noBorder: true,
|
|
4744
4746
|
noRing: true,
|
|
4745
|
-
sharp: true,
|
|
4746
4747
|
},
|
|
4747
4748
|
grid2: {
|
|
4748
4749
|
md: true,
|
|
@@ -4881,7 +4882,7 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
4881
4882
|
size: {
|
|
4882
4883
|
px: new PxTheme(buttonAspectRatioClasses, true),
|
|
4883
4884
|
py: PyTheme.createForUI(),
|
|
4884
|
-
gap:
|
|
4885
|
+
gap: GapTheme.createForUI(),
|
|
4885
4886
|
text: new FontSizeTheme(),
|
|
4886
4887
|
lineHeight: new LineHeightTheme({
|
|
4887
4888
|
xs: "[--lh:1.3]",
|
|
@@ -4926,7 +4927,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4926
4927
|
size: {
|
|
4927
4928
|
px: new PxTheme(badgeAspectRatioClasses, true),
|
|
4928
4929
|
py: PyTheme.createForUI(),
|
|
4929
|
-
gap:
|
|
4930
|
+
gap: GapTheme.createForUI(),
|
|
4930
4931
|
text: new FontSizeTheme(),
|
|
4931
4932
|
lineHeight: LineHeightTheme.createDefault()
|
|
4932
4933
|
},
|
|
@@ -4976,7 +4977,7 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4976
4977
|
lg: "[--lh:1.2]",
|
|
4977
4978
|
xl: "[--lh:1.2]"
|
|
4978
4979
|
}),
|
|
4979
|
-
gap:
|
|
4980
|
+
gap: GapTheme.createForUI()
|
|
4980
4981
|
},
|
|
4981
4982
|
appearance: {
|
|
4982
4983
|
background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
|
|
@@ -5010,21 +5011,21 @@ const defaultCodeTheme = new ComponentTheme("code", "", {
|
|
|
5010
5011
|
xl: "[--aspect-ratio:1.5]",
|
|
5011
5012
|
}, true),
|
|
5012
5013
|
py: new PyTheme({
|
|
5013
|
-
xs: "[--py-unit:
|
|
5014
|
-
sm: "[--py-unit:
|
|
5015
|
-
md: "[--py-unit:1
|
|
5016
|
-
lg: "[--py-unit:2]",
|
|
5017
|
-
xl: "[--py-unit:
|
|
5014
|
+
xs: "[--py-unit:0.6]",
|
|
5015
|
+
sm: "[--py-unit:0.8]",
|
|
5016
|
+
md: "[--py-unit:1]",
|
|
5017
|
+
lg: "[--py-unit:1.2]",
|
|
5018
|
+
xl: "[--py-unit:1.4]",
|
|
5018
5019
|
}, true),
|
|
5019
5020
|
text: new FontSizeTheme(),
|
|
5020
5021
|
lineHeight: new LineHeightTheme({
|
|
5021
|
-
xs: "[--lh:1
|
|
5022
|
-
sm: "[--lh:1
|
|
5023
|
-
md: "[--lh:1
|
|
5024
|
-
lg: "[--lh:1
|
|
5025
|
-
xl: "[--lh:1
|
|
5022
|
+
xs: "[--lh:1]",
|
|
5023
|
+
sm: "[--lh:1]",
|
|
5024
|
+
md: "[--lh:1]",
|
|
5025
|
+
lg: "[--lh:1]",
|
|
5026
|
+
xl: "[--lh:1]"
|
|
5026
5027
|
}),
|
|
5027
|
-
gap:
|
|
5028
|
+
gap: GapTheme.createForUI()
|
|
5028
5029
|
},
|
|
5029
5030
|
appearance: {
|
|
5030
5031
|
background: GenericVariantTheme.createSimpleUIElementBgAppearanceTheme(),
|
|
@@ -5256,7 +5257,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
|
|
|
5256
5257
|
xl: "[--py-unit:10]",
|
|
5257
5258
|
}),
|
|
5258
5259
|
lineHeight: LineHeightTheme.createDefault(),
|
|
5259
|
-
gap:
|
|
5260
|
+
gap: GapTheme.createForLayout(),
|
|
5260
5261
|
},
|
|
5261
5262
|
layout: {
|
|
5262
5263
|
...defaultLayoutsThemes,
|
|
@@ -5279,7 +5280,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
|
|
|
5279
5280
|
|
|
5280
5281
|
const defaultRowTheme = new ComponentTheme("div", "", {
|
|
5281
5282
|
size: {
|
|
5282
|
-
gap:
|
|
5283
|
+
gap: GapTheme.createForLayout(),
|
|
5283
5284
|
breakpoint: new BreakpointTheme(),
|
|
5284
5285
|
},
|
|
5285
5286
|
layout: {
|
|
@@ -5338,7 +5339,7 @@ class SizeTheme extends BaseTheme {
|
|
|
5338
5339
|
|
|
5339
5340
|
const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
|
|
5340
5341
|
size: {
|
|
5341
|
-
gap:
|
|
5342
|
+
gap: GapTheme.createForLayout(),
|
|
5342
5343
|
maxWidth: new SizeTheme({ xs: 'max-w-3xl', sm: 'max-w-4xl', md: 'max-w-5xl', lg: 'max-w-6xl', xl: 'max-w-7xl' }),
|
|
5343
5344
|
},
|
|
5344
5345
|
layout: {
|
|
@@ -5360,7 +5361,7 @@ const defaultContainerTheme = new ComponentTheme("div", "mx-auto w-full", {
|
|
|
5360
5361
|
|
|
5361
5362
|
const defaultColTheme = new ComponentTheme("div", "", {
|
|
5362
5363
|
size: {
|
|
5363
|
-
gap:
|
|
5364
|
+
gap: GapTheme.createForLayout(),
|
|
5364
5365
|
},
|
|
5365
5366
|
layout: {
|
|
5366
5367
|
...defaultLayoutsThemes,
|
|
@@ -5389,7 +5390,7 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
5389
5390
|
xl: "[--aspect-ratio:1]",
|
|
5390
5391
|
}),
|
|
5391
5392
|
py: new PyTheme(),
|
|
5392
|
-
gap:
|
|
5393
|
+
gap: GapTheme.createForLayout(),
|
|
5393
5394
|
breakpoint: new BreakpointTheme(),
|
|
5394
5395
|
},
|
|
5395
5396
|
layout: {
|
|
@@ -5425,7 +5426,13 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
|
|
|
5425
5426
|
lg: "[--py-unit:16] max-laptop:[--py-unit:8] max-tablet:[--py-unit:2]",
|
|
5426
5427
|
xl: "[--py-unit:20] max-laptop:[--py-unit:10] max-tablet:[--py-unit:4]",
|
|
5427
5428
|
}),
|
|
5428
|
-
gap: new GapTheme(
|
|
5429
|
+
gap: new GapTheme({
|
|
5430
|
+
xs: "[--gap-unit:4] max-laptop:[--gap-unit:3] max-tablet:[--gap-unit:2]",
|
|
5431
|
+
sm: "[--gap-unit:6] max-laptop:[--gap-unit:5] max-tablet:[--gap-unit:4]",
|
|
5432
|
+
md: "[--gap-unit:8] max-laptop:[--gap-unit:6] max-tablet:[--gap-unit:4]",
|
|
5433
|
+
lg: "[--gap-unit:10] max-laptop:[--gap-unit:8] max-tablet:[--gap-unit:6]",
|
|
5434
|
+
xl: "[--gap-unit:12] max-laptop:[--gap-unit:10] max-tablet:[--gap-unit:8]",
|
|
5435
|
+
}),
|
|
5429
5436
|
breakpoint: new BreakpointTheme(),
|
|
5430
5437
|
},
|
|
5431
5438
|
appearance: {
|
|
@@ -5447,7 +5454,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full", {
|
|
|
5447
5454
|
|
|
5448
5455
|
const gridSubThemes = {
|
|
5449
5456
|
size: {
|
|
5450
|
-
gap:
|
|
5457
|
+
gap: GapTheme.createForLayout(),
|
|
5451
5458
|
},
|
|
5452
5459
|
appearance: {
|
|
5453
5460
|
background: GenericVariantTheme.createLayoutBgAppearanceTheme(),
|
|
@@ -5529,7 +5536,7 @@ const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointe
|
|
|
5529
5536
|
size: {
|
|
5530
5537
|
text: new FontSizeTheme(),
|
|
5531
5538
|
lineHeight: LineHeightTheme.createDefault(),
|
|
5532
|
-
gap:
|
|
5539
|
+
gap: GapTheme.createForUI(),
|
|
5533
5540
|
},
|
|
5534
5541
|
appearance: {
|
|
5535
5542
|
text: GenericVariantTheme.createTypographyTextTheme(),
|
|
@@ -5570,7 +5577,7 @@ const defaultInputTheme = new ComponentTheme("input", "w-full transition-all dur
|
|
|
5570
5577
|
xl: "[--aspect-ratio:2]",
|
|
5571
5578
|
}, true),
|
|
5572
5579
|
py: PyTheme.createForUI(),
|
|
5573
|
-
gap:
|
|
5580
|
+
gap: GapTheme.createForUI(),
|
|
5574
5581
|
text: new FontSizeTheme(),
|
|
5575
5582
|
lineHeight: LineHeightTheme.createDefault(),
|
|
5576
5583
|
},
|