@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/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(shapeClasses, sizeMap) {
3285
+ constructor(roundedClasses) {
3296
3286
  super();
3297
- ComponentKeys.shape.forEach((key) => {
3298
- if (key === 'rounded' && sizeMap) {
3299
- this[key] = sizeMap;
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(sizeMap) {
3307
- return new RadiusTheme(uiBorderRadiusShapeClasses, sizeMap);
3291
+ static createUITheme(customRounded) {
3292
+ return new RadiusTheme(customRounded || uiBorderRadiusClasses);
3308
3293
  }
3309
- static createLayoutTheme(sizeMap) {
3310
- return new RadiusTheme(layoutBorderRadiusShapeClasses, sizeMap);
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
- const shapeValue = this[shape];
3317
- if (shapeValue === undefined) {
3318
- return [''];
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