@vaneui/ui 0.3.1-alpha.20250914210126.5142197 → 0.3.1-alpha.20250917170051.b819c80

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/index.js CHANGED
@@ -3679,19 +3679,55 @@ class SizeTheme extends BaseTheme {
3679
3679
  }
3680
3680
  }
3681
3681
 
3682
+ const layoutGapClasses = {
3683
+ xs: "gap-(--layout-gap-xs)",
3684
+ sm: "gap-(--layout-gap-sm)",
3685
+ md: "gap-(--layout-gap-md)",
3686
+ lg: "gap-(--layout-gap-lg)",
3687
+ xl: "gap-(--layout-gap-xl)",
3688
+ };
3689
+ const layoutPaddingXClasses = {
3690
+ xs: "px-(--layout-px-xs)",
3691
+ sm: "px-(--layout-px-sm)",
3692
+ md: "px-(--layout-px-md)",
3693
+ lg: "px-(--layout-px-lg)",
3694
+ xl: "px-(--layout-px-xl)",
3695
+ };
3696
+ const layoutPaddingYClasses = {
3697
+ xs: "py-(--layout-py-xs)",
3698
+ sm: "py-(--layout-py-sm)",
3699
+ md: "py-(--layout-py-md)",
3700
+ lg: "py-(--layout-py-lg)",
3701
+ xl: "py-(--layout-py-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)",
3716
+ };
3717
+
3682
3718
  class GapTheme extends BaseTheme {
3683
3719
  constructor(sizeMap) {
3684
3720
  super();
3685
- /** Extra-small gap - 0.5rem spacing between items */
3686
- this.xs = 'gap-2';
3687
- /** Small gap - 0.75rem spacing between items */
3688
- this.sm = 'gap-3';
3689
- /** Medium gap - 1rem spacing between items */
3690
- this.md = 'gap-4';
3691
- /** Large gap - 1.25rem spacing between items */
3692
- this.lg = 'gap-5';
3693
- /** Extra-large gap - 1.5rem spacing between items */
3694
- this.xl = 'gap-6';
3721
+ /** Extra-small gap - uses CSS variable --layout-gap-xs */
3722
+ this.xs = layoutGapClasses.xs;
3723
+ /** Small gap - uses CSS variable --layout-gap-sm */
3724
+ this.sm = layoutGapClasses.sm;
3725
+ /** Medium gap - uses CSS variable --layout-gap-md */
3726
+ this.md = layoutGapClasses.md;
3727
+ /** Large gap - uses CSS variable --layout-gap-lg */
3728
+ this.lg = layoutGapClasses.lg;
3729
+ /** Extra-large gap - uses CSS variable --layout-gap-xl */
3730
+ this.xl = layoutGapClasses.xl;
3695
3731
  if (sizeMap) {
3696
3732
  ComponentKeys.size.forEach((key) => {
3697
3733
  if (sizeMap[key] !== undefined) {
@@ -3873,9 +3909,7 @@ class PxTheme extends PaddingTheme {
3873
3909
  // Override with PxTheme's default classes if no custom sizeMap provided
3874
3910
  if (!sizeMap) {
3875
3911
  ComponentKeys.size.forEach((key) => {
3876
- this[key] = {
3877
- xs: "px-2", sm: "px-4", md: "px-6", lg: "px-8", xl: "px-10"
3878
- }[key];
3912
+ this[key] = layoutPaddingXClasses[key];
3879
3913
  });
3880
3914
  }
3881
3915
  }
@@ -3888,9 +3922,7 @@ class PyTheme extends PaddingTheme {
3888
3922
  // Override with PyTheme's default classes if no custom sizeMap provided
3889
3923
  if (!sizeMap) {
3890
3924
  ComponentKeys.size.forEach((key) => {
3891
- this[key] = {
3892
- xs: "py-2", sm: "py-4", md: "py-6", lg: "py-8", xl: "py-10"
3893
- }[key];
3925
+ this[key] = layoutPaddingYClasses[key];
3894
3926
  });
3895
3927
  }
3896
3928
  }
@@ -4733,9 +4765,7 @@ const themeDefaults = {
4733
4765
 
4734
4766
  const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
4735
4767
  size: {
4736
- px: new PxTheme({
4737
- xs: 'px-2', sm: 'px-3', md: 'px-4', lg: 'px-5', xl: 'px-6',
4738
- }),
4768
+ px: new PxTheme({ xs: 'px-2', sm: 'px-3', md: 'px-4', lg: 'px-5', xl: 'px-6', }),
4739
4769
  py: new PyTheme({ xs: 'py-1', sm: 'py-1.5', md: 'py-2', lg: 'py-2.5', xl: 'py-3' }),
4740
4770
  gap: new GapTheme({ xs: 'gap-1', sm: 'gap-1.5', md: 'gap-2', lg: 'gap-2.5', xl: 'gap-3' }),
4741
4771
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
@@ -5055,27 +5085,9 @@ class BreakpointTheme extends BaseTheme {
5055
5085
 
5056
5086
  const defaultCardTheme = new ComponentTheme("div", "", {
5057
5087
  size: {
5058
- px: new PxTheme({
5059
- xs: "px-4",
5060
- sm: "px-5 max-lg:px-4",
5061
- md: "px-6 max-lg:px-5",
5062
- lg: "px-7 max-lg:px-6 max-md:px-5",
5063
- xl: "px-8 max-lg:px-7 max-md:px-6"
5064
- }),
5065
- py: new PyTheme({
5066
- xs: "py-4",
5067
- sm: "py-5 max-lg:py-4",
5068
- md: "py-6 max-lg:py-5",
5069
- lg: "py-7 max-lg:py-6 max-md:py-5",
5070
- xl: "py-8 max-lg:py-7 max-md:py-6"
5071
- }),
5072
- gap: new GapTheme({
5073
- xs: "gap-2",
5074
- sm: "gap-3 max-lg:gap-2",
5075
- md: "gap-4 max-lg:gap-3",
5076
- lg: "gap-5 max-lg:gap-4 max-md:gap-3",
5077
- xl: "gap-6 max-lg:gap-5 max-md:gap-4"
5078
- }),
5088
+ px: new PxTheme(),
5089
+ py: new PyTheme(),
5090
+ gap: new GapTheme(),
5079
5091
  },
5080
5092
  layout: {
5081
5093
  ...defaultLayoutsThemes,
@@ -5132,13 +5144,7 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
5132
5144
 
5133
5145
  const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full", {
5134
5146
  size: {
5135
- gap: new GapTheme({
5136
- xs: 'gap-2 max-lg:gap-1',
5137
- sm: 'gap-4 max-lg:gap-3 max-md:gap-2',
5138
- md: 'gap-6 max-lg:gap-5 max-md:gap-4',
5139
- lg: 'gap-8 max-lg:gap-7 max-md:gap-6',
5140
- xl: 'gap-10 max-lg:gap-9 max-md:gap-8',
5141
- }),
5147
+ gap: new GapTheme(),
5142
5148
  maxWidth: new SizeTheme({ xs: 'max-w-3xl', sm: 'max-w-4xl', md: 'max-w-5xl', lg: 'max-w-6xl', xl: 'max-w-7xl' }),
5143
5149
  },
5144
5150
  layout: {
@@ -5181,8 +5187,8 @@ const defaultColTheme = new ComponentTheme("div", "", {
5181
5187
 
5182
5188
  const defaultStackTheme = new ComponentTheme("div", "", {
5183
5189
  size: {
5184
- px: new PxTheme({ xs: 'px-2', sm: 'px-3', md: 'px-4', lg: 'px-5', xl: 'px-6' }),
5185
- py: new PyTheme({ xs: 'py-2', sm: 'py-3', md: 'py-4', lg: 'py-5', xl: 'py-6' }),
5190
+ px: new PxTheme(),
5191
+ py: new PyTheme(),
5186
5192
  gap: new GapTheme(),
5187
5193
  breakpoint: new BreakpointTheme(),
5188
5194
  },
@@ -5205,21 +5211,9 @@ const defaultStackTheme = new ComponentTheme("div", "", {
5205
5211
 
5206
5212
  const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
5207
5213
  size: {
5208
- px: new PxTheme({
5209
- xs: 'px-5 max-lg:px-4 max-md:px-3',
5210
- sm: 'px-6 max-lg:px-5 max-md:px-4',
5211
- md: 'px-7 max-lg:px-6 max-md:px-5',
5212
- lg: 'px-8 max-lg:px-7 max-md:px-6',
5213
- xl: 'px-9 max-lg:px-8 max-md:px-7',
5214
- }),
5215
- py: new PyTheme({
5216
- xs: 'py-4 max-md:py-3',
5217
- sm: 'py-8 max-md:py-6',
5218
- md: 'py-12 max-md:py-6',
5219
- lg: 'py-16 max-lg:py-14 max-md:py-12',
5220
- xl: 'py-20 max-lg:py-16 max-md:py-12',
5221
- }),
5222
- gap: new GapTheme({ xs: 'gap-4', sm: 'gap-6', md: 'gap-8', lg: 'gap-12', xl: 'gap-16' }),
5214
+ px: new PxTheme(sectionPaddingXClasses),
5215
+ py: new PyTheme(sectionPaddingYClasses),
5216
+ gap: new GapTheme(),
5223
5217
  breakpoint: new BreakpointTheme(),
5224
5218
  },
5225
5219
  appearance: {
@@ -5241,13 +5235,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
5241
5235
 
5242
5236
  const gridSubThemes = {
5243
5237
  size: {
5244
- gap: new GapTheme({
5245
- xs: "gap-2",
5246
- sm: "gap-4 max-lg:gap-2",
5247
- md: "gap-6 max-lg:gap-4",
5248
- lg: "gap-8 max-lg:gap-6 max-md:gap-4",
5249
- xl: "gap-10 max-lg:gap-8 max-md:gap-6"
5250
- }),
5238
+ gap: new GapTheme(),
5251
5239
  },
5252
5240
  appearance: {
5253
5241
  background: GenericVariantTheme.createLayoutBgAppearanceTheme(),