@everymatrix/ui-skeleton 0.0.0
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-c4768c66.js +1239 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/ui-skeleton-43520ebc.js +136 -0
- package/dist/cjs/ui-skeleton.cjs.entry.js +10 -0
- package/dist/cjs/ui-skeleton.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/ui-skeleton/index.js +1 -0
- package/dist/collection/components/ui-skeleton/ui-skeleton.css +59 -0
- package/dist/collection/components/ui-skeleton/ui-skeleton.js +418 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-f5cf3f14.js +1213 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/ui-skeleton-2473e87c.js +134 -0
- package/dist/esm/ui-skeleton.entry.js +2 -0
- package/dist/esm/ui-skeleton.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.dev.js +19 -0
- package/dist/stencil.config.js +17 -0
- package/dist/storybook/main.js +21 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/stencil.config.dev.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/storybook/main.d.ts +3 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/ui-skeleton/.stencil/packages/stencil/ui-skeleton/storybook/preview.d.ts +70 -0
- package/dist/types/components/ui-skeleton/index.d.ts +1 -0
- package/dist/types/components/ui-skeleton/ui-skeleton.d.ts +71 -0
- package/dist/types/components.d.ts +149 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/ui-skeleton/index.esm.js +1 -0
- package/dist/ui-skeleton/p-443310cf.js +2 -0
- package/dist/ui-skeleton/p-75e06c6c.js +1 -0
- package/dist/ui-skeleton/p-933ae591.entry.js +1 -0
- package/dist/ui-skeleton/p-e1255160.js +1 -0
- package/dist/ui-skeleton/ui-skeleton.esm.js +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +26 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-c4768c66.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
const defineCustomElements = async (win, options) => {
|
|
9
|
+
if (typeof window === 'undefined') return undefined;
|
|
10
|
+
await appGlobals.globalScripts();
|
|
11
|
+
return index.bootstrapLazy([["ui-skeleton.cjs",[[0,"ui-skeleton",{"structure":[1],"width":[2],"height":[2],"borderRadius":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[2],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"],"primaryColor":["updateStyles"],"secondaryColor":["updateStyles"]}]]]], options);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.setNonce = index.setNonce;
|
|
15
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-c4768c66.js');
|
|
4
|
+
|
|
5
|
+
const uiSkeletonCss = ".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, 2px)}.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, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.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, 5px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 250px);height:var(--emw-skeleton-image-height, 200px);border-radius:var(--emw-skeleton-image-border-radius, 10px)}.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, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";
|
|
6
|
+
const UiSkeletonStyle0 = uiSkeletonCss;
|
|
7
|
+
|
|
8
|
+
const UiSkeleton = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* Toggles skeleton animation
|
|
13
|
+
*/
|
|
14
|
+
this.animation = true;
|
|
15
|
+
}
|
|
16
|
+
handleStructureChange(newValue, oldValue) {
|
|
17
|
+
if (oldValue !== newValue) {
|
|
18
|
+
this.handleStructure(newValue);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
updateStyles() {
|
|
22
|
+
if (this.primaryColor) {
|
|
23
|
+
this.skeletonContainer.style.setProperty('--emw-skeleton-primary-color', this.primaryColor);
|
|
24
|
+
}
|
|
25
|
+
if (this.secondaryColor) {
|
|
26
|
+
this.skeletonContainer.style.setProperty('--emw-skeleton-secondary-color', this.secondaryColor);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
handleStructure(structure) {
|
|
30
|
+
switch (structure) {
|
|
31
|
+
case 'logo':
|
|
32
|
+
return this.renderLogo();
|
|
33
|
+
case 'image':
|
|
34
|
+
return this.renderImage();
|
|
35
|
+
case 'title':
|
|
36
|
+
return this.renderTitle();
|
|
37
|
+
case 'text':
|
|
38
|
+
return this.renderText();
|
|
39
|
+
case 'rectangle':
|
|
40
|
+
return this.renderRectangle();
|
|
41
|
+
case 'circle':
|
|
42
|
+
return this.renderCircle();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
renderLogo() {
|
|
46
|
+
const styles = {
|
|
47
|
+
width: `${this.width}px`,
|
|
48
|
+
height: `${this.height}px`,
|
|
49
|
+
'background-color': `${this.color}`,
|
|
50
|
+
'border-radius': `${this.borderRadius}px`,
|
|
51
|
+
'margin-bottom': `${this.marginBottom}px`,
|
|
52
|
+
'margin-top': `${this.marginTop}px`,
|
|
53
|
+
'margin-left': `${this.marginLeft}px`,
|
|
54
|
+
'margin-right': `${this.marginRight}px`
|
|
55
|
+
};
|
|
56
|
+
return (index.h("div", { style: styles, class: "Skeleton Logo" }));
|
|
57
|
+
}
|
|
58
|
+
renderImage() {
|
|
59
|
+
const styles = {
|
|
60
|
+
width: `${this.width}px`,
|
|
61
|
+
height: `${this.height}px`,
|
|
62
|
+
'background-color': `${this.color}`,
|
|
63
|
+
'border-radius': `${this.borderRadius}px`,
|
|
64
|
+
'margin-bottom': `${this.marginBottom}px`,
|
|
65
|
+
'margin-top': `${this.marginTop}px`,
|
|
66
|
+
'margin-left': `${this.marginLeft}px`,
|
|
67
|
+
'margin-right': `${this.marginRight}px`
|
|
68
|
+
};
|
|
69
|
+
return (index.h("div", { style: styles, class: "Skeleton Image" }));
|
|
70
|
+
}
|
|
71
|
+
renderTitle() {
|
|
72
|
+
const styles = {
|
|
73
|
+
width: `${this.width}px`,
|
|
74
|
+
height: `${this.height}px`,
|
|
75
|
+
'background-color': `${this.color}`,
|
|
76
|
+
'border-radius': `${this.borderRadius}px`,
|
|
77
|
+
'margin-bottom': `${this.marginBottom}px`,
|
|
78
|
+
'margin-top': `${this.marginTop}px`,
|
|
79
|
+
'margin-left': `${this.marginLeft}px`,
|
|
80
|
+
'margin-right': `${this.marginRight}px`
|
|
81
|
+
};
|
|
82
|
+
return (index.h("div", { style: styles, class: "Skeleton Title" }));
|
|
83
|
+
}
|
|
84
|
+
renderText() {
|
|
85
|
+
const styles = {
|
|
86
|
+
width: `${this.width}px`,
|
|
87
|
+
height: `${this.height}px`,
|
|
88
|
+
'background-color': `${this.color}`,
|
|
89
|
+
'border-radius': `${this.borderRadius}px`,
|
|
90
|
+
'margin-bottom': `${this.marginBottom}px`,
|
|
91
|
+
'margin-top': `${this.marginTop}px`,
|
|
92
|
+
'margin-left': `${this.marginLeft}px`,
|
|
93
|
+
'margin-right': `${this.marginRight}px`
|
|
94
|
+
};
|
|
95
|
+
return (Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { style: styles, key: index$1, class: "Skeleton Text" }))));
|
|
96
|
+
}
|
|
97
|
+
renderRectangle() {
|
|
98
|
+
const styles = {
|
|
99
|
+
width: `${this.width}px`,
|
|
100
|
+
height: `${this.height}px`,
|
|
101
|
+
'backgroud-color': `${this.color}`,
|
|
102
|
+
'border-radius': `${this.borderRadius}px`,
|
|
103
|
+
'margin-bottom': `${this.marginBottom}px`,
|
|
104
|
+
'margin-top': `${this.marginTop}px`,
|
|
105
|
+
'margin-left': `${this.marginLeft}px`,
|
|
106
|
+
'margin-right': `${this.marginRight}px`
|
|
107
|
+
};
|
|
108
|
+
return (index.h("div", { style: styles, class: "Skeleton Rectangle" }));
|
|
109
|
+
}
|
|
110
|
+
renderCircle() {
|
|
111
|
+
const styles = {
|
|
112
|
+
width: `${this.size}px`,
|
|
113
|
+
height: `${this.size}px`,
|
|
114
|
+
'background-color': `${this.color}`,
|
|
115
|
+
'margin-bottom': `${this.marginBottom}px`,
|
|
116
|
+
'margin-top': `${this.marginTop}px`,
|
|
117
|
+
'margin-left': `${this.marginLeft}px`,
|
|
118
|
+
'margin-right': `${this.marginRight}px`
|
|
119
|
+
};
|
|
120
|
+
return (index.h("div", { ref: el => this.skeletonContainer = el }, index.h("div", { style: styles, class: "Circle " + (this.animation ? 'Skeleton' : '') })));
|
|
121
|
+
}
|
|
122
|
+
componentDidLoad() {
|
|
123
|
+
this.updateStyles();
|
|
124
|
+
}
|
|
125
|
+
render() {
|
|
126
|
+
return (this.handleStructure(this.structure));
|
|
127
|
+
}
|
|
128
|
+
static get watchers() { return {
|
|
129
|
+
"structure": ["handleStructureChange"],
|
|
130
|
+
"primaryColor": ["updateStyles"],
|
|
131
|
+
"secondaryColor": ["updateStyles"]
|
|
132
|
+
}; }
|
|
133
|
+
};
|
|
134
|
+
UiSkeleton.style = UiSkeletonStyle0;
|
|
135
|
+
|
|
136
|
+
exports.UiSkeleton = UiSkeleton;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-c4768c66.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('ui-skeleton.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
22
|
+
return index.bootstrapLazy([["ui-skeleton.cjs",[[0,"ui-skeleton",{"structure":[1],"width":[2],"height":[2],"borderRadius":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[2],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"],"primaryColor":["updateStyles"],"secondaryColor":["updateStyles"]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UiSkeleton } from './ui-skeleton';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
.Skeleton {
|
|
2
|
+
animation: skeleton-loading 1s linear infinite alternate;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.Rectangle {
|
|
6
|
+
background-color: var(--emw-skeleton-rectangle-background, #c2c2c2);
|
|
7
|
+
width: var(--emw-skeleton-rectangle-width, 400px);
|
|
8
|
+
height: var(--emw-skeleton-rectangle-height, 200px);
|
|
9
|
+
border-radius: var(--emw-skeleton-rectangle-border-radius, 2px);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.Circle {
|
|
13
|
+
background-color: var(--emw-skeleton-circle-background, #c2c2c2);
|
|
14
|
+
width: var(--emw-skeleton-circle-size, 400px);
|
|
15
|
+
height: var(--emw-skeleton-circle-size, 400px);
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.Text {
|
|
20
|
+
background-color: var(--emw-skeleton-text-background, #c2c2c2);
|
|
21
|
+
width: var(--emw-skeleton-text-width, 500px);
|
|
22
|
+
height: var(--emw-skeleton-text-height, 20px);
|
|
23
|
+
border-radius: var(--emw-skeleton-text-border-radius, 5px);
|
|
24
|
+
margin-bottom: var(--emw-skeleton-text-margin-bottom, 5px);
|
|
25
|
+
}
|
|
26
|
+
.Text:last-child {
|
|
27
|
+
width: var(--emw-skeleton-text-width-100, 300px);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.Title {
|
|
31
|
+
background-color: var(--emw-skeleton-title-background, #c2c2c2);
|
|
32
|
+
width: var(--emw-skeleton-title-width, 300px);
|
|
33
|
+
height: var(--emw-skeleton-title-height, 30px);
|
|
34
|
+
border-radius: var(--emw-skeleton-title-border-radius, 5px);
|
|
35
|
+
margin-bottom: var(--emw-skeleton-title-margin-bottom, 5px);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.Image {
|
|
39
|
+
background-color: var(--emw-skeleton-image-background, #c2c2c2);
|
|
40
|
+
width: var(--emw-skeleton-image-width, 250px);
|
|
41
|
+
height: var(--emw-skeleton-image-height, 200px);
|
|
42
|
+
border-radius: var(--emw-skeleton-image-border-radius, 10px);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.Logo {
|
|
46
|
+
background-color: var(--emw-skeleton-logo-background, #c2c2c2);
|
|
47
|
+
width: var(--emw-skeleton-logo-width, 120px);
|
|
48
|
+
height: var(--emw-skeleton-logo-height, 75px);
|
|
49
|
+
border-radius: var(--emw-skeleton-logo-border-radius, 5px);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@keyframes skeleton-loading {
|
|
53
|
+
0% {
|
|
54
|
+
background-color: var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2));
|
|
55
|
+
}
|
|
56
|
+
100% {
|
|
57
|
+
background-color: var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0));
|
|
58
|
+
}
|
|
59
|
+
}
|