@aquera/nile-elements 1.3.9-beta-1.2 → 1.3.9-beta-1.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.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "1.3.9-beta-1.2",
6
+ "version": "1.3.9-beta-1.1",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -5,11 +5,15 @@ export const styles = css`
5
5
  -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
6
6
  -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
7
7
  text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
8
- display: inline-block;
8
+ box-sizing: border-box;
9
+ display: block;
10
+ width: 100%;
9
11
  }
10
12
 
11
13
  .skeleton-loader {
12
- display: inline-block;
14
+ display: flex;
15
+ justify-content: center;
16
+ align-items: center;
13
17
  width: 100%;
14
18
  }
15
19
 
@@ -28,13 +28,10 @@ export class NileSkeletonLoader extends NileElement {
28
28
  if (typeof value === 'number') {
29
29
  return `${value}px`;
30
30
  }
31
- // If it's a string, check if it's a plain number (no units)
32
31
  const trimmed = String(value).trim();
33
- // Check if it's a numeric value without units (matches numbers, optionally with decimals)
34
32
  if (/^\d+(\.\d+)?$/.test(trimmed)) {
35
33
  return `${trimmed}px`;
36
34
  }
37
- // If it already has units (px, %, em, rem, etc.), return as-is
38
35
  return trimmed;
39
36
  }
40
37
 
@@ -43,7 +40,7 @@ export class NileSkeletonLoader extends NileElement {
43
40
  if (formattedWidth) {
44
41
  return formattedWidth;
45
42
  }
46
- return this.variant === 'circular' ? '40px' : '100%';
43
+ return this.variant === 'circular' ? '40px' : 'calc(100% - 20px)';
47
44
  }
48
45
 
49
46
  private getComputedHeight(): string {