@thalassic/ui 22.17.0 → 22.17.1

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.
@@ -457,6 +457,9 @@ const OVERLAY_POSITION_MAP = {
457
457
  },
458
458
  };
459
459
 
460
+ /** Every step of the theme radius scale, used to tell a token apart from a raw CSS length. */
461
+ const RADIUS_TOKENS = ['sm', 'md', 'lg', 'xl', '2xl', '3xl'];
462
+
460
463
  const buildOverlayPositions = (position, offset) => {
461
464
  const preferred = OVERLAY_POSITION_MAP[position];
462
465
  const rest = Object.values(OVERLAY_POSITION_MAP).filter(p => p !== preferred);
@@ -8330,7 +8333,7 @@ class Skeleton {
8330
8333
  return {
8331
8334
  '--tls-skeleton-width': this._resolveDimension(width),
8332
8335
  '--tls-skeleton-height': this._resolveDimension(height),
8333
- '--tls-skeleton-radius': this.rounded() ? '50%' : `var(--radius-${this.radius()})`,
8336
+ '--tls-skeleton-radius': this.rounded() ? '50%' : this._resolveRadius(this.radius()),
8334
8337
  '--tls-skeleton-duration': `${this.duration()}ms`,
8335
8338
  };
8336
8339
  }, /* @ts-ignore */
@@ -8343,6 +8346,13 @@ class Skeleton {
8343
8346
  return value;
8344
8347
  return `${value}px`;
8345
8348
  }
8349
+ _resolveRadius(value) {
8350
+ if (typeof value === 'number')
8351
+ return `${value}px`;
8352
+ if (RADIUS_TOKENS.some(token => token === value))
8353
+ return `var(--radius-${value})`;
8354
+ return value;
8355
+ }
8346
8356
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Skeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
8347
8357
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: Skeleton, isStandalone: true, selector: "tls-skeleton", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "class": "hostClasses()", "style": "hostStyles()" } }, ngImport: i0, template: '', isInline: true });
8348
8358
  }