@everymatrix/ui-skeleton 1.80.11 → 1.80.13
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/cjs/index.cjs.js +1 -1
- package/dist/cjs/{ui-skeleton-282391af.js → ui-skeleton-a9330561.js} +9 -9
- package/dist/cjs/ui-skeleton.cjs.entry.js +1 -1
- package/dist/collection/components/ui-skeleton/ui-skeleton.css +7 -7
- package/dist/collection/components/ui-skeleton/ui-skeleton.js +8 -8
- package/dist/esm/index.js +1 -1
- package/dist/esm/{ui-skeleton-ae35c6f2.js → ui-skeleton-ed169f8f.js} +9 -9
- package/dist/esm/ui-skeleton.entry.js +1 -1
- package/dist/ui-skeleton/index.esm.js +1 -1
- package/dist/ui-skeleton/ui-skeleton-ed169f8f.js +1 -0
- package/dist/ui-skeleton/ui-skeleton.entry.js +1 -1
- package/package.json +1 -1
- package/dist/ui-skeleton/ui-skeleton-ae35c6f2.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-946ac65b.js');
|
|
4
4
|
|
|
5
|
-
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.
|
|
5
|
+
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
|
|
6
6
|
const UiSkeletonStyle0 = uiSkeletonCss;
|
|
7
7
|
|
|
8
8
|
const UiSkeleton = class {
|
|
@@ -16,7 +16,7 @@ const UiSkeleton = class {
|
|
|
16
16
|
marginTop: this.handleStylingProps(this.marginTop),
|
|
17
17
|
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
18
18
|
marginRight: this.handleStylingProps(this.marginRight),
|
|
19
|
-
size: this.handleStylingProps(this.size)
|
|
19
|
+
size: this.handleStylingProps(this.size),
|
|
20
20
|
};
|
|
21
21
|
this.structure = undefined;
|
|
22
22
|
this.width = 'unset';
|
|
@@ -73,22 +73,22 @@ const UiSkeleton = class {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
renderLogo() {
|
|
76
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: '
|
|
76
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonLogo ' + (this.animation ? 'Skeleton' : '') })));
|
|
77
77
|
}
|
|
78
78
|
renderImage() {
|
|
79
|
-
return index.h("div", { class: '
|
|
79
|
+
return index.h("div", { class: 'SkeletonImage ' + (this.animation ? 'Skeleton' : '') });
|
|
80
80
|
}
|
|
81
81
|
renderTitle() {
|
|
82
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: '
|
|
82
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonTitle ' + (this.animation ? 'Skeleton' : '') })));
|
|
83
83
|
}
|
|
84
84
|
renderText() {
|
|
85
|
-
return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class: '
|
|
85
|
+
return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class: 'SkeletonText ' + (this.animation ? 'Skeleton' : '') })))));
|
|
86
86
|
}
|
|
87
87
|
renderRectangle() {
|
|
88
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: '
|
|
88
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonRectangle ' + (this.animation ? 'Skeleton' : '') })));
|
|
89
89
|
}
|
|
90
90
|
renderCircle() {
|
|
91
|
-
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: '
|
|
91
|
+
return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'SkeletonCircle ' + (this.animation ? 'Skeleton' : '') })));
|
|
92
92
|
}
|
|
93
93
|
render() {
|
|
94
94
|
let styleBlock = '';
|
|
@@ -168,7 +168,7 @@ const UiSkeleton = class {
|
|
|
168
168
|
default:
|
|
169
169
|
styleBlock = '';
|
|
170
170
|
}
|
|
171
|
-
return (index.h(index.Host, { key: '
|
|
171
|
+
return (index.h(index.Host, { key: 'c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8' }, index.h("style", { key: '9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19' }, styleBlock), this.handleStructure(this.structure)));
|
|
172
172
|
}
|
|
173
173
|
static get watchers() { return {
|
|
174
174
|
"structure": ["handleStructureChange"]
|
|
@@ -6,32 +6,32 @@
|
|
|
6
6
|
animation: skeleton-loading 1s linear infinite alternate;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.
|
|
9
|
+
.SkeletonRectangle {
|
|
10
10
|
background-color: var(--emw-skeleton-rectangle-background, #c2c2c2);
|
|
11
11
|
width: var(--emw-skeleton-rectangle-width, 400px);
|
|
12
12
|
height: var(--emw-skeleton-rectangle-height, 200px);
|
|
13
13
|
border-radius: var(--emw-skeleton-rectangle-border-radius, 10px);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.SkeletonCircle {
|
|
17
17
|
background-color: var(--emw-skeleton-circle-background, #c2c2c2);
|
|
18
18
|
width: var(--emw-skeleton-circle-size, 400px);
|
|
19
19
|
height: var(--emw-skeleton-circle-size, 400px);
|
|
20
20
|
border-radius: 50%;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
23
|
+
.SkeletonText {
|
|
24
24
|
background-color: var(--emw-skeleton-text-background, #c2c2c2);
|
|
25
25
|
width: var(--emw-skeleton-text-width, 500px);
|
|
26
26
|
height: var(--emw-skeleton-text-height, 20px);
|
|
27
27
|
border-radius: var(--emw-skeleton-text-border-radius, 10px);
|
|
28
28
|
margin-bottom: var(--emw-skeleton-text-margin-bottom, 5px);
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.SkeletonText:last-child {
|
|
31
31
|
width: calc(var(--emw-skeleton-text-width, 400px) - 100px);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.SkeletonTitle {
|
|
35
35
|
background-color: var(--emw-skeleton-title-background, #c2c2c2);
|
|
36
36
|
width: var(--emw-skeleton-title-width, 300px);
|
|
37
37
|
height: var(--emw-skeleton-title-height, 30px);
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
margin-bottom: var(--emw-skeleton-title-margin-bottom, 5px);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.SkeletonImage {
|
|
43
43
|
background-color: var(--emw-skeleton-image-background, #c2c2c2);
|
|
44
44
|
width: var(--emw-skeleton-image-width, 100%);
|
|
45
45
|
height: var(--emw-skeleton-image-height, 100%);
|
|
46
46
|
border-radius: var(--emw-skeleton-image-border-radius, unset);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.
|
|
49
|
+
.SkeletonLogo {
|
|
50
50
|
background-color: var(--emw-skeleton-logo-background, #c2c2c2);
|
|
51
51
|
width: var(--emw-skeleton-logo-width, 120px);
|
|
52
52
|
height: var(--emw-skeleton-logo-height, 75px);
|
|
@@ -9,7 +9,7 @@ export class UiSkeleton {
|
|
|
9
9
|
marginTop: this.handleStylingProps(this.marginTop),
|
|
10
10
|
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
11
11
|
marginRight: this.handleStylingProps(this.marginRight),
|
|
12
|
-
size: this.handleStylingProps(this.size)
|
|
12
|
+
size: this.handleStylingProps(this.size),
|
|
13
13
|
};
|
|
14
14
|
this.structure = undefined;
|
|
15
15
|
this.width = 'unset';
|
|
@@ -66,22 +66,22 @@ export class UiSkeleton {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
renderLogo() {
|
|
69
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class: '
|
|
69
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonLogo ' + (this.animation ? 'Skeleton' : '') })));
|
|
70
70
|
}
|
|
71
71
|
renderImage() {
|
|
72
|
-
return h("div", { class: '
|
|
72
|
+
return h("div", { class: 'SkeletonImage ' + (this.animation ? 'Skeleton' : '') });
|
|
73
73
|
}
|
|
74
74
|
renderTitle() {
|
|
75
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class: '
|
|
75
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonTitle ' + (this.animation ? 'Skeleton' : '') })));
|
|
76
76
|
}
|
|
77
77
|
renderText() {
|
|
78
|
-
return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: '
|
|
78
|
+
return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: 'SkeletonText ' + (this.animation ? 'Skeleton' : '') })))));
|
|
79
79
|
}
|
|
80
80
|
renderRectangle() {
|
|
81
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class: '
|
|
81
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonRectangle ' + (this.animation ? 'Skeleton' : '') })));
|
|
82
82
|
}
|
|
83
83
|
renderCircle() {
|
|
84
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class: '
|
|
84
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonCircle ' + (this.animation ? 'Skeleton' : '') })));
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
87
|
let styleBlock = '';
|
|
@@ -161,7 +161,7 @@ export class UiSkeleton {
|
|
|
161
161
|
default:
|
|
162
162
|
styleBlock = '';
|
|
163
163
|
}
|
|
164
|
-
return (h(Host, { key: '
|
|
164
|
+
return (h(Host, { key: 'c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8' }, h("style", { key: '9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19' }, styleBlock), this.handleStructure(this.structure)));
|
|
165
165
|
}
|
|
166
166
|
static get is() { return "ui-skeleton"; }
|
|
167
167
|
static get originalStyleUrls() {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { U as UiSkeleton } from './ui-skeleton-
|
|
1
|
+
export { U as UiSkeleton } from './ui-skeleton-ed169f8f.js';
|
|
2
2
|
import './index-b2193545.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-b2193545.js';
|
|
2
2
|
|
|
3
|
-
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.
|
|
3
|
+
const uiSkeletonCss = ":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
|
|
4
4
|
const UiSkeletonStyle0 = uiSkeletonCss;
|
|
5
5
|
|
|
6
6
|
const UiSkeleton = class {
|
|
@@ -14,7 +14,7 @@ const UiSkeleton = class {
|
|
|
14
14
|
marginTop: this.handleStylingProps(this.marginTop),
|
|
15
15
|
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
16
16
|
marginRight: this.handleStylingProps(this.marginRight),
|
|
17
|
-
size: this.handleStylingProps(this.size)
|
|
17
|
+
size: this.handleStylingProps(this.size),
|
|
18
18
|
};
|
|
19
19
|
this.structure = undefined;
|
|
20
20
|
this.width = 'unset';
|
|
@@ -71,22 +71,22 @@ const UiSkeleton = class {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
renderLogo() {
|
|
74
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class: '
|
|
74
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonLogo ' + (this.animation ? 'Skeleton' : '') })));
|
|
75
75
|
}
|
|
76
76
|
renderImage() {
|
|
77
|
-
return h("div", { class: '
|
|
77
|
+
return h("div", { class: 'SkeletonImage ' + (this.animation ? 'Skeleton' : '') });
|
|
78
78
|
}
|
|
79
79
|
renderTitle() {
|
|
80
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class: '
|
|
80
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonTitle ' + (this.animation ? 'Skeleton' : '') })));
|
|
81
81
|
}
|
|
82
82
|
renderText() {
|
|
83
|
-
return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: '
|
|
83
|
+
return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: 'SkeletonText ' + (this.animation ? 'Skeleton' : '') })))));
|
|
84
84
|
}
|
|
85
85
|
renderRectangle() {
|
|
86
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class: '
|
|
86
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonRectangle ' + (this.animation ? 'Skeleton' : '') })));
|
|
87
87
|
}
|
|
88
88
|
renderCircle() {
|
|
89
|
-
return (h("div", { class: "SkeletonContainer" }, h("div", { class: '
|
|
89
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'SkeletonCircle ' + (this.animation ? 'Skeleton' : '') })));
|
|
90
90
|
}
|
|
91
91
|
render() {
|
|
92
92
|
let styleBlock = '';
|
|
@@ -166,7 +166,7 @@ const UiSkeleton = class {
|
|
|
166
166
|
default:
|
|
167
167
|
styleBlock = '';
|
|
168
168
|
}
|
|
169
|
-
return (h(Host, { key: '
|
|
169
|
+
return (h(Host, { key: 'c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8' }, h("style", { key: '9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19' }, styleBlock), this.handleStructure(this.structure)));
|
|
170
170
|
}
|
|
171
171
|
static get watchers() { return {
|
|
172
172
|
"structure": ["handleStructureChange"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { U as ui_skeleton } from './ui-skeleton-
|
|
1
|
+
export { U as ui_skeleton } from './ui-skeleton-ed169f8f.js';
|
|
2
2
|
import './index-b2193545.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{U as UiSkeleton}from"./ui-skeleton-
|
|
1
|
+
export{U as UiSkeleton}from"./ui-skeleton-ed169f8f.js";import"./index-b2193545.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,H as n}from"./index-b2193545.js";const i=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},t("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};i.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{i as U}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{U as ui_skeleton}from"./ui-skeleton-
|
|
1
|
+
export{U as ui_skeleton}from"./ui-skeleton-ed169f8f.js";import"./index-b2193545.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as n}from"./index-b2193545.js";const i=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"Text "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},t("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};i.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{i as U}
|