@vaneui/ui 0.3.1-alpha.20251214142729.7385e1d → 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.
@@ -1,9 +1,8 @@
1
1
  import { SizeKey } from "../../props";
2
2
  import { PaddingTheme } from "./paddingTheme";
3
3
  import type { CategoryProps } from "../../props";
4
- /** Horizontal padding theme - controls left and right padding */
4
+ /** Horizontal padding theme - controls left and right padding via aspect ratio */
5
5
  export declare class PxTheme extends PaddingTheme {
6
- private aspectRatioMap?;
7
6
  private isUIComponent?;
8
7
  constructor(aspectRatio?: Record<SizeKey, string>, isUIComponent?: boolean);
9
8
  getClasses(extractedKeys: CategoryProps): string[];
@@ -1 +1 @@
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,WAAW,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,UAAQ;IAYxE,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,EAAiB,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,kFAAkF;AAClF,qBAAa,OAAQ,SAAQ,YAAY;IACvC,OAAO,CAAC,aAAa,CAAC,CAAU;gBAEpB,WAAW,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,aAAa,UAAQ;IAWxE,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,EAAE;CAkBnD"}
package/dist/index.esm.js CHANGED
@@ -3623,24 +3623,23 @@ class PaddingTheme extends BaseTheme {
3623
3623
  }
3624
3624
  }
3625
3625
 
3626
- /** Horizontal padding theme - controls left and right padding */
3626
+ /** Horizontal padding theme - controls left and right padding via aspect ratio */
3627
3627
  class PxTheme extends PaddingTheme {
3628
3628
  constructor(aspectRatio, isUIComponent = false) {
3629
- super();
3630
- this.aspectRatioMap = aspectRatio ? aspectRatio : {
3631
- xs: "[--aspect-ratio:1]",
3632
- sm: "[--aspect-ratio:1]",
3633
- md: "[--aspect-ratio:1]",
3634
- lg: "[--aspect-ratio:1]",
3635
- xl: "[--aspect-ratio:1]",
3636
- };
3629
+ super(aspectRatio);
3637
3630
  this.isUIComponent = isUIComponent;
3631
+ // Override with PxTheme's default aspect ratio classes if no custom map provided
3632
+ if (!aspectRatio) {
3633
+ ComponentKeys.size.forEach((key) => {
3634
+ this[key] = "[--aspect-ratio:1]";
3635
+ });
3636
+ }
3638
3637
  }
3639
3638
  getClasses(extractedKeys) {
3640
- var _a, _b;
3639
+ var _a;
3641
3640
  if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
3642
3641
  const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
3643
- const aspectRatioClass = (_b = this.aspectRatioMap) === null || _b === void 0 ? void 0 : _b[size];
3642
+ const aspectRatioClass = this[size];
3644
3643
  const classes = [];
3645
3644
  // Only add aspect-ratio class - no padding classes
3646
3645
  if (aspectRatioClass)