@vaneui/ui 0.3.1-alpha.20251214141144.6dd59c5 → 0.3.1-alpha.20251215181324.24aaf05

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
@@ -3625,26 +3625,23 @@ class PaddingTheme extends BaseTheme {
3625
3625
  }
3626
3626
  }
3627
3627
 
3628
- /** Horizontal padding theme - controls left and right padding */
3628
+ /** Horizontal padding theme - controls left and right padding via aspect ratio */
3629
3629
  class PxTheme extends PaddingTheme {
3630
3630
  constructor(aspectRatio, isUIComponent = false) {
3631
- super();
3632
- this.aspectRatioMap = aspectRatio ? aspectRatio : {
3633
- xs: "[--aspect-ratio:1]",
3634
- sm: "[--aspect-ratio:1]",
3635
- md: "[--aspect-ratio:1]",
3636
- lg: "[--aspect-ratio:1]",
3637
- xl: "[--aspect-ratio:1]",
3638
- };
3631
+ super(aspectRatio);
3639
3632
  this.isUIComponent = isUIComponent;
3640
- // PxTheme should not set any padding classes - that's PyTheme's job
3641
- // PxTheme only handles aspect-ratio
3633
+ // Override with PxTheme's default aspect ratio classes if no custom map provided
3634
+ if (!aspectRatio) {
3635
+ ComponentKeys.size.forEach((key) => {
3636
+ this[key] = "[--aspect-ratio:1]";
3637
+ });
3638
+ }
3642
3639
  }
3643
3640
  getClasses(extractedKeys) {
3644
- var _a, _b;
3641
+ var _a;
3645
3642
  if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
3646
3643
  const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
3647
- const aspectRatioClass = (_b = this.aspectRatioMap) === null || _b === void 0 ? void 0 : _b[size];
3644
+ const aspectRatioClass = this[size];
3648
3645
  const classes = [];
3649
3646
  // Only add aspect-ratio class - no padding classes
3650
3647
  if (aspectRatioClass)
@@ -4525,11 +4522,11 @@ const themeDefaults = {
4525
4522
  };
4526
4523
 
4527
4524
  const buttonAspectRatioClasses = {
4528
- xs: "[--aspect-ratio:2]", // px-2 vs py-1 = 2
4529
- sm: "[--aspect-ratio:2]", // px-3 vs py-1.5 = 2
4530
- md: "[--aspect-ratio:2]", // px-4 vs py-2 = 2
4531
- lg: "[--aspect-ratio:2]", // px-5 vs py-2.5 = 2
4532
- xl: "[--aspect-ratio:2]", // px-6 vs py-3 = 2
4525
+ xs: "[--aspect-ratio:2]",
4526
+ sm: "[--aspect-ratio:2]",
4527
+ md: "[--aspect-ratio:2]",
4528
+ lg: "[--aspect-ratio:2]",
4529
+ xl: "[--aspect-ratio:2]",
4533
4530
  };
4534
4531
  const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
4535
4532
  size: {