@vaneui/ui 0.3.1-alpha.20250925201320.8b6a424 → 0.3.1-alpha.20250926201820.1b8c4ca

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.
@@ -8,6 +8,7 @@ export declare class RadiusTheme extends BaseTheme {
8
8
  sharp: string;
9
9
  /** Size-based rounded corners - varies by component size */
10
10
  rounded: Record<SizeKey, string>;
11
+ private isUIComponent;
11
12
  private constructor();
12
13
  static createUITheme(customRounded?: Record<SizeKey, string>): RadiusTheme;
13
14
  static createLayoutTheme(): RadiusTheme;
@@ -1 +1 @@
1
- {"version":3,"file":"radiusTheme.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/theme/layout/radiusTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,qBAAa,WAAY,SAAQ,SAAS;IACxC,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAkB;IAC9B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAkB;IAC/B,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAEjC,OAAO;IAKP,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,WAAW;IAI1E,MAAM,CAAC,iBAAiB,IAAI,WAAW;IAIvC,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE;CAiBnD"}
1
+ {"version":3,"file":"radiusTheme.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/theme/layout/radiusTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAAa,WAAY,SAAQ,SAAS;IACxC,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAkB;IAC9B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAkB;IAC/B,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAEjC,OAAO,CAAC,aAAa,CAAU;IAE/B,OAAO;IAMP,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,WAAW;IAW1E,MAAM,CAAC,iBAAiB,IAAI,WAAW;IAWvC,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE;CAkBnD"}
@@ -5,7 +5,7 @@ import type { CategoryProps } from "../../props";
5
5
  export declare class PxTheme extends PaddingTheme {
6
6
  private aspectRatioMap?;
7
7
  private isUIComponent?;
8
- constructor(sizeMap?: Record<SizeKey, string>, aspectRatioMap?: Record<SizeKey, string>, isUIComponent?: boolean);
8
+ constructor(aspectRatioMap?: Record<SizeKey, string>, isUIComponent?: boolean);
9
9
  getClasses(extractedKeys: CategoryProps): string[];
10
10
  }
11
11
  //# sourceMappingURL=pxTheme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pxTheme.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/theme/size/pxTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAiB,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,iEAAiE;AACjE,qBAAa,OAAQ,SAAQ,YAAY;IACvC,OAAO,CAAC,cAAc,CAAC,CAA0B;IACjD,OAAO,CAAC,aAAa,CAAC,CAAU;gBAEpB,OAAO,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,UAAQ;IAY9G,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE;CAkBnD"}
1
+ {"version":3,"file":"pxTheme.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/theme/size/pxTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,iEAAiE;AACjE,qBAAa,OAAQ,SAAQ,YAAY;IACvC,OAAO,CAAC,cAAc,CAAC,CAA0B;IACjD,OAAO,CAAC,aAAa,CAAC,CAAU;gBAEpB,cAAc,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,UAAQ;IAQ3E,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE;CAiBnD"}
package/dist/index.esm.js CHANGED
@@ -3794,35 +3794,35 @@ class GapTheme extends BaseTheme {
3794
3794
  }
3795
3795
  }
3796
3796
 
3797
- const uiBorderRadiusClasses = {
3798
- xs: "rounded-(--ui-br-xs)",
3799
- sm: "rounded-(--ui-br-sm)",
3800
- md: "rounded-(--ui-br-md)",
3801
- lg: "rounded-(--ui-br-lg)",
3802
- xl: "rounded-(--ui-br-xl)",
3803
- };
3804
- const layoutBorderRadiusClasses = {
3805
- xs: "rounded-(--layout-br-xs)",
3806
- sm: "rounded-(--layout-br-sm)",
3807
- md: "rounded-(--layout-br-md)",
3808
- lg: "rounded-(--layout-br-lg)",
3809
- xl: "rounded-(--layout-br-xl)",
3810
- };
3811
-
3812
3797
  class RadiusTheme extends BaseTheme {
3813
- constructor(roundedClasses) {
3798
+ constructor(roundedClasses, isUIComponent = false) {
3814
3799
  super();
3815
3800
  /** Pill shape - fully rounded corners */
3816
3801
  this.pill = "rounded-full";
3817
3802
  /** Sharp shape - no rounded corners */
3818
3803
  this.sharp = "rounded-none";
3819
3804
  this.rounded = roundedClasses;
3805
+ this.isUIComponent = isUIComponent;
3820
3806
  }
3821
3807
  static createUITheme(customRounded) {
3822
- return new RadiusTheme(customRounded || uiBorderRadiusClasses);
3808
+ const brUnitClasses = {
3809
+ xs: '[--br-unit:1]',
3810
+ sm: '[--br-unit:2]',
3811
+ md: '[--br-unit:3]',
3812
+ lg: '[--br-unit:4]',
3813
+ xl: '[--br-unit:5]'
3814
+ };
3815
+ return new RadiusTheme(customRounded || brUnitClasses, true);
3823
3816
  }
3824
3817
  static createLayoutTheme() {
3825
- return new RadiusTheme(layoutBorderRadiusClasses);
3818
+ const brUnitClasses = {
3819
+ xs: '[--br-unit:3]',
3820
+ sm: '[--br-unit:4]',
3821
+ md: '[--br-unit:5]',
3822
+ lg: '[--br-unit:6]',
3823
+ xl: '[--br-unit:7]'
3824
+ };
3825
+ return new RadiusTheme(brUnitClasses, false);
3826
3826
  }
3827
3827
  getClasses(extractedKeys) {
3828
3828
  var _a, _b;
@@ -3834,8 +3834,9 @@ class RadiusTheme extends BaseTheme {
3834
3834
  case 'sharp':
3835
3835
  return [this.sharp];
3836
3836
  case 'rounded': {
3837
- const roundedClass = this.rounded[size];
3838
- return roundedClass ? [roundedClass] : [];
3837
+ const brUnitClass = this.rounded[size];
3838
+ const roundedVar = this.isUIComponent ? "rounded-(--ui-br)" : "rounded-(--br)";
3839
+ return brUnitClass ? [brUnitClass, roundedVar] : [];
3839
3840
  }
3840
3841
  default:
3841
3842
  return [];
@@ -3952,32 +3953,26 @@ class PaddingTheme extends BaseTheme {
3952
3953
 
3953
3954
  /** Horizontal padding theme - controls left and right padding */
3954
3955
  class PxTheme extends PaddingTheme {
3955
- constructor(sizeMap, aspectRatioMap, isUIComponent = false) {
3956
- super(sizeMap);
3956
+ constructor(aspectRatioMap, isUIComponent = false) {
3957
+ super();
3957
3958
  this.aspectRatioMap = aspectRatioMap;
3958
3959
  this.isUIComponent = isUIComponent;
3959
- // Override with PxTheme's default classes if no custom sizeMap provided
3960
- if (!sizeMap) {
3961
- ComponentKeys.size.forEach((key) => {
3962
- this[key] = layoutPaddingClasses[key];
3963
- });
3964
- }
3960
+ // PxTheme should not set any padding classes - that's PyTheme's job
3961
+ // PxTheme only handles aspect-ratio
3965
3962
  }
3966
3963
  getClasses(extractedKeys) {
3967
3964
  var _a, _b;
3968
3965
  if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
3969
3966
  const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
3970
- const paddingClass = this[size];
3971
3967
  const aspectRatioClass = (_b = this.aspectRatioMap) === null || _b === void 0 ? void 0 : _b[size];
3972
3968
  const classes = [];
3973
- if (paddingClass)
3974
- classes.push(paddingClass);
3969
+ // Only add aspect-ratio class - no padding classes
3975
3970
  if (aspectRatioClass)
3976
3971
  classes.push(aspectRatioClass);
3977
3972
  // Use UI or layout CSS variables based on component type
3978
3973
  const cssVar = this.isUIComponent ? "px-(--ui-px)" : "px-(--px)";
3979
3974
  classes.push(cssVar);
3980
- return classes.length > 1 ? classes : [];
3975
+ return classes;
3981
3976
  }
3982
3977
  return [];
3983
3978
  }
@@ -4847,7 +4842,7 @@ const themeDefaults = {
4847
4842
 
4848
4843
  const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
4849
4844
  size: {
4850
- px: new PxTheme(uiPaddingClasses, buttonAspectRatioClasses, true),
4845
+ px: new PxTheme(buttonAspectRatioClasses, true),
4851
4846
  py: new PyTheme(uiPaddingClasses, true),
4852
4847
  gap: new GapTheme({ xs: '[--gap-unit:1]', sm: '[--gap-unit:1.5]', md: '[--gap-unit:2]', lg: '[--gap-unit:2.5]', xl: '[--gap-unit:3]' }, true),
4853
4848
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
@@ -4877,7 +4872,7 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
4877
4872
 
4878
4873
  const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
4879
4874
  size: {
4880
- px: new PxTheme(uiPaddingClasses, badgeAspectRatioClasses, true),
4875
+ px: new PxTheme(badgeAspectRatioClasses, true),
4881
4876
  py: new PyTheme(uiPaddingClasses, true),
4882
4877
  gap: new GapTheme({ xs: '[--gap-unit:1]', sm: '[--gap-unit:1.5]', md: '[--gap-unit:2]', lg: '[--gap-unit:2.5]', xl: '[--gap-unit:3]' }, true),
4883
4878
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' })
@@ -4906,7 +4901,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4906
4901
 
4907
4902
  const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all duration-200 whitespace-nowrap", {
4908
4903
  size: {
4909
- px: new PxTheme(chipPyClasses, chipAspectRatioClasses, true),
4904
+ px: new PxTheme(chipAspectRatioClasses, true),
4910
4905
  py: new PyTheme(chipPyClasses, true),
4911
4906
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
4912
4907
  gap: new GapTheme({ xs: '[--gap-unit:1]', sm: '[--gap-unit:1.5]', md: '[--gap-unit:2]', lg: '[--gap-unit:2.5]', xl: '[--gap-unit:3]' }, true)
@@ -4935,7 +4930,7 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
4935
4930
 
4936
4931
  const defaultCodeTheme = new ComponentTheme("code", "", {
4937
4932
  size: {
4938
- px: new PxTheme(codePyClasses, codeAspectRatioClasses, true),
4933
+ px: new PxTheme(codeAspectRatioClasses, true),
4939
4934
  py: new PyTheme(codePyClasses, true),
4940
4935
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-sm', lg: 'text-base', xl: 'text-lg' }),
4941
4936
  gap: new GapTheme({ xs: '[--gap-unit:0.5]', sm: '[--gap-unit:1]', md: '[--gap-unit:1.5]', lg: '[--gap-unit:2]', xl: '[--gap-unit:2.5]' }, true)
@@ -5323,7 +5318,7 @@ const defaultStackTheme = new ComponentTheme("div", "", {
5323
5318
 
5324
5319
  const defaultSectionTheme = new ComponentTheme("div", "w-full", {
5325
5320
  size: {
5326
- px: new PxTheme(layoutPaddingClasses, sectionAspectRatioClasses),
5321
+ px: new PxTheme(sectionAspectRatioClasses),
5327
5322
  py: new PyTheme({
5328
5323
  xs: "[--py-unit:4]",
5329
5324
  sm: "[--py-unit:8]",
@@ -5452,7 +5447,7 @@ const defaultCheckboxWrapperTheme = new ComponentTheme("span", "", {
5452
5447
  const defaultLabelTheme = new ComponentTheme("label", "has-[input]:cursor-pointer cursor-default", {
5453
5448
  size: {
5454
5449
  text: new SizeTheme(textSizeClasses),
5455
- gap: new GapTheme({ xs: 'gap-1.5', sm: 'gap-2', md: 'gap-2.5', lg: 'gap-3', xl: 'gap-3' }),
5450
+ gap: new GapTheme({ xs: '[--gap-unit:1.5]', sm: '[--gap-unit:2]', md: '[--gap-unit:2.5]', lg: '[--gap-unit:3]', xl: '[--gap-unit:3]' }, true),
5456
5451
  },
5457
5452
  appearance: {
5458
5453
  text: GenericVariantTheme.createTypographyTextTheme(),
@@ -5485,7 +5480,7 @@ const defaultImgTheme = new ComponentTheme("img", "object-cover", // Default to
5485
5480
 
5486
5481
  const defaultInputTheme = new ComponentTheme("input", "w-full transition-all duration-200", {
5487
5482
  size: {
5488
- px: new PxTheme(uiPaddingClasses, inputAspectRatioClasses, true),
5483
+ px: new PxTheme(inputAspectRatioClasses, true),
5489
5484
  py: new PyTheme(uiPaddingClasses, true),
5490
5485
  gap: new GapTheme({ xs: '[--gap-unit:1]', sm: '[--gap-unit:1.5]', md: '[--gap-unit:2]', lg: '[--gap-unit:2.5]', xl: '[--gap-unit:3]' }, true),
5491
5486
  text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),