@proximus/lavender-skeleton 1.4.19-beta.2 → 1.4.20-alpha.10
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/Skeleton.d.ts +1 -0
- package/dist/custom-elements.json +9 -0
- package/dist/index.es.js +14 -3
- package/dist/web-types.json +2 -2
- package/package.json +1 -1
package/dist/Skeleton.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare const skeletonsVariantValues: string[];
|
|
|
4
4
|
export declare class Skeleton extends PxElement<HTMLDivElement> {
|
|
5
5
|
protected static readonly template: HTMLTemplateElement;
|
|
6
6
|
static nativeName: string;
|
|
7
|
+
static nativeAttributes: {};
|
|
7
8
|
constructor();
|
|
8
9
|
static get observedAttributes(): string[];
|
|
9
10
|
connectedCallback(): void;
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PxElement as e, createTemplate as t, log as n, renderTemplate as r } from "@proximus/lavender-common";
|
|
2
|
-
|
|
2
|
+
//#region src/skeleton.css?inline
|
|
3
3
|
var i = ":host,:host>*{box-sizing:border-box;display:block}.skeleton-wrapper{flex-direction:column;align-items:flex-start;gap:10px;min-width:40px;min-height:16px;display:flex}.skeleton{border-radius:var(--px-radius-main);background-color:var(--px-color-background-state-disabled-default);background-image:linear-gradient(-80deg,#0000 0% 25%,#ffffff3d 40% 55%,#0000 75% 100%);background-size:200% 100%;align-self:stretch;height:16px;animation:1.5s ease-in-out infinite skeletonLoading}[inverted] .skeleton{background-color:var(--px-color-background-state-disabled-inverted);background-image:linear-gradient(-80deg,#fff0 0% 25%,#0000001a 40% 55%,#fff0 75% 100%)}.skeleton.heading-s,.skeleton.heading-m,.skeleton.heading-l{max-width:240px}.skeleton.heading-s{height:24px}.skeleton.heading-m{height:32px}.skeleton.heading-l{height:40px}.skeleton.body,.skeleton.body-block{width:300px}.skeleton.body{height:16px}.skeleton.body-block{height:16px}.skeleton.body-block:nth-of-type(3){width:180px}.skeleton.action-s,.skeleton.action-l{border-radius:var(--px-radius-pill);height:40px}.skeleton.action-s{width:40px}.skeleton.action-l{width:160px}.skeleton.asset-s{width:40px;height:40px}.skeleton.asset-l{width:80px;height:80px}.skeleton.panel{width:300px;height:200px}@keyframes skeletonLoading{0%{background-position-x:150%}40%{background-position-x:-50%}to{background-position-x:-50%}}", a = new CSSStyleSheet();
|
|
4
4
|
a.replaceSync(i);
|
|
5
5
|
var o = [
|
|
@@ -20,11 +20,18 @@ var o = [
|
|
|
20
20
|
static {
|
|
21
21
|
this.nativeName = "div";
|
|
22
22
|
}
|
|
23
|
+
static {
|
|
24
|
+
this.nativeAttributes = {};
|
|
25
|
+
}
|
|
23
26
|
constructor() {
|
|
24
27
|
super(a), r(this.shadowRoot, i.template);
|
|
25
28
|
}
|
|
26
29
|
static get observedAttributes() {
|
|
27
|
-
return [
|
|
30
|
+
return [
|
|
31
|
+
...super.observedAttributes,
|
|
32
|
+
"variant",
|
|
33
|
+
"inverted"
|
|
34
|
+
];
|
|
28
35
|
}
|
|
29
36
|
connectedCallback() {
|
|
30
37
|
this.hasAttribute("variant") || this.setAttribute("variant", "body");
|
|
@@ -47,7 +54,10 @@ var o = [
|
|
|
47
54
|
}
|
|
48
55
|
}
|
|
49
56
|
updateVariant(e) {
|
|
50
|
-
this.checkName(o, e)
|
|
57
|
+
if (!this.checkName(o, e)) {
|
|
58
|
+
n(`"${e}" is not a valid variant value for ${this.tagName.toLowerCase()}. Allowed values are: "${o.join("\", \"")}".`);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
51
61
|
}
|
|
52
62
|
get $container() {
|
|
53
63
|
return this.shadowRoot.querySelector("px-container");
|
|
@@ -66,4 +76,5 @@ var o = [
|
|
|
66
76
|
}
|
|
67
77
|
};
|
|
68
78
|
customElements.get("px-skeleton") || customElements.define("px-skeleton", s);
|
|
79
|
+
//#endregion
|
|
69
80
|
export { s as Skeleton, o as skeletonsVariantValues };
|
package/dist/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@proximus/lavender-skeleton",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.20-alpha.10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "px-skeleton",
|
|
11
|
-
"description": "\n---\n",
|
|
11
|
+
"description": "\n\n---\n",
|
|
12
12
|
"doc-url": "",
|
|
13
13
|
"attributes": [
|
|
14
14
|
{ "name": "variant", "value": { "type": "string" } },
|