@vaneui/ui 0.2.1-alpha.20250820182348.d8e8551 → 0.2.1-alpha.20250820194940.1d9162d
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/layout/radiusTheme.d.ts +10 -4
- package/dist/index.esm.js +18 -27
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +18 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3280,44 +3280,35 @@ const layoutBorderRadiusClasses = {
|
|
|
3280
3280
|
lg: "rounded-(--layout-border-radius-lg)",
|
|
3281
3281
|
xl: "rounded-(--layout-border-radius-xl)",
|
|
3282
3282
|
};
|
|
3283
|
-
const uiBorderRadiusShapeClasses = {
|
|
3284
|
-
pill: "rounded-full",
|
|
3285
|
-
sharp: "rounded-none",
|
|
3286
|
-
rounded: uiBorderRadiusClasses,
|
|
3287
|
-
};
|
|
3288
|
-
const layoutBorderRadiusShapeClasses = {
|
|
3289
|
-
pill: "rounded-full",
|
|
3290
|
-
sharp: "rounded-none",
|
|
3291
|
-
rounded: layoutBorderRadiusClasses,
|
|
3292
|
-
};
|
|
3293
3283
|
|
|
3294
3284
|
class RadiusTheme extends BaseTheme {
|
|
3295
|
-
constructor(
|
|
3285
|
+
constructor(roundedClasses) {
|
|
3296
3286
|
super();
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
}
|
|
3301
|
-
else {
|
|
3302
|
-
this[key] = shapeClasses[key];
|
|
3303
|
-
}
|
|
3304
|
-
});
|
|
3287
|
+
this.pill = "rounded-full";
|
|
3288
|
+
this.sharp = "rounded-none";
|
|
3289
|
+
this.rounded = roundedClasses;
|
|
3305
3290
|
}
|
|
3306
|
-
static createUITheme(
|
|
3307
|
-
return new RadiusTheme(
|
|
3291
|
+
static createUITheme(customRounded) {
|
|
3292
|
+
return new RadiusTheme(customRounded || uiBorderRadiusClasses);
|
|
3308
3293
|
}
|
|
3309
|
-
static createLayoutTheme(
|
|
3310
|
-
return new RadiusTheme(
|
|
3294
|
+
static createLayoutTheme(customRounded) {
|
|
3295
|
+
return new RadiusTheme(customRounded || layoutBorderRadiusClasses);
|
|
3311
3296
|
}
|
|
3312
3297
|
getClasses(extractedKeys) {
|
|
3313
3298
|
var _a, _b;
|
|
3314
3299
|
const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
|
|
3315
3300
|
const shape = (_b = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.shape) !== null && _b !== void 0 ? _b : 'rounded';
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3301
|
+
switch (shape) {
|
|
3302
|
+
case 'pill':
|
|
3303
|
+
return [this.pill];
|
|
3304
|
+
case 'sharp':
|
|
3305
|
+
return [this.sharp];
|
|
3306
|
+
case 'rounded':
|
|
3307
|
+
const roundedClass = this.rounded[size];
|
|
3308
|
+
return roundedClass ? [roundedClass] : [];
|
|
3309
|
+
default:
|
|
3310
|
+
return [];
|
|
3319
3311
|
}
|
|
3320
|
-
return [typeof shapeValue === 'string' ? shapeValue : shapeValue[size] || ''];
|
|
3321
3312
|
}
|
|
3322
3313
|
}
|
|
3323
3314
|
|