@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/components/ui/theme/size/pxTheme.d.ts +1 -2
- package/dist/components/ui/theme/size/pxTheme.d.ts.map +1 -1
- package/dist/index.esm.js +15 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15 -18
- package/dist/index.js.map +1 -1
- package/dist/ui.css +6 -24
- package/package.json +1 -1
|
@@ -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,
|
|
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,26 +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;
|
|
3638
|
-
//
|
|
3639
|
-
|
|
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
|
+
}
|
|
3640
3637
|
}
|
|
3641
3638
|
getClasses(extractedKeys) {
|
|
3642
|
-
var _a
|
|
3639
|
+
var _a;
|
|
3643
3640
|
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
|
|
3644
3641
|
const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
|
|
3645
|
-
const aspectRatioClass =
|
|
3642
|
+
const aspectRatioClass = this[size];
|
|
3646
3643
|
const classes = [];
|
|
3647
3644
|
// Only add aspect-ratio class - no padding classes
|
|
3648
3645
|
if (aspectRatioClass)
|
|
@@ -4523,11 +4520,11 @@ const themeDefaults = {
|
|
|
4523
4520
|
};
|
|
4524
4521
|
|
|
4525
4522
|
const buttonAspectRatioClasses = {
|
|
4526
|
-
xs: "[--aspect-ratio:2]",
|
|
4527
|
-
sm: "[--aspect-ratio:2]",
|
|
4528
|
-
md: "[--aspect-ratio:2]",
|
|
4529
|
-
lg: "[--aspect-ratio:2]",
|
|
4530
|
-
xl: "[--aspect-ratio:2]",
|
|
4523
|
+
xs: "[--aspect-ratio:2]",
|
|
4524
|
+
sm: "[--aspect-ratio:2]",
|
|
4525
|
+
md: "[--aspect-ratio:2]",
|
|
4526
|
+
lg: "[--aspect-ratio:2]",
|
|
4527
|
+
xl: "[--aspect-ratio:2]",
|
|
4531
4528
|
};
|
|
4532
4529
|
const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-pointer transition-all duration-200 whitespace-nowrap", {
|
|
4533
4530
|
size: {
|