@vaneui/ui 0.2.1-alpha.20250820194940.1d9162d → 0.2.1-alpha.20250820203636.5bf2e74

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
@@ -3238,33 +3238,31 @@ class SizeTheme extends BaseTheme {
3238
3238
 
3239
3239
  class GapTheme extends BaseTheme {
3240
3240
  constructor(sizeMap) {
3241
- // If a simple size map is provided, convert it to the expected format
3242
- const initial = sizeMap ? { gap: sizeMap } : undefined;
3243
3241
  super();
3244
- ComponentKeys.gap.forEach((key) => {
3245
- if (key === 'gap' && (initial === null || initial === void 0 ? void 0 : initial.gap)) {
3246
- this[key] = initial.gap;
3247
- }
3248
- else {
3249
- this[key] = GapTheme.defaultClasses[key];
3250
- }
3242
+ this.defaultClasses = {
3243
+ xs: 'gap-2', sm: 'gap-3', md: 'gap-4', lg: 'gap-5', xl: 'gap-6'
3244
+ };
3245
+ ComponentKeys.size.forEach((key) => {
3246
+ var _a;
3247
+ this[key] = (_a = sizeMap === null || sizeMap === void 0 ? void 0 : sizeMap[key]) !== null && _a !== void 0 ? _a : this.defaultClasses[key];
3251
3248
  });
3252
3249
  }
3253
3250
  getClasses(extractedKeys) {
3254
- var _a, _b;
3251
+ var _a;
3255
3252
  const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
3256
- const key = (_b = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.gap) !== null && _b !== void 0 ? _b : 'noGap';
3257
- const gapValue = this[key];
3258
- if (gapValue === undefined) {
3259
- return [''];
3253
+ const gap = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.gap;
3254
+ // If noGap is true, return empty array (no gap classes)
3255
+ if (gap === 'noGap') {
3256
+ return [];
3260
3257
  }
3261
- return [typeof gapValue === 'string' ? gapValue : gapValue[size] || ''];
3258
+ // If gap is true or undefined, apply gap classes based on size
3259
+ if (gap === 'gap') {
3260
+ const gapClass = this[size];
3261
+ return gapClass ? [gapClass] : [];
3262
+ }
3263
+ return [];
3262
3264
  }
3263
3265
  }
3264
- GapTheme.defaultClasses = {
3265
- gap: { xs: 'gap-2', sm: 'gap-3', md: 'gap-4', lg: 'gap-5', xl: 'gap-6' },
3266
- noGap: "gap-0"
3267
- };
3268
3266
 
3269
3267
  const uiBorderRadiusClasses = {
3270
3268
  xs: "rounded-(--ui-border-radius-xs)",