@semcore/skeleton 5.42.1 → 16.0.0-prerelease.4
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/CHANGELOG.md +6 -0
- package/lib/cjs/Charts/Area.js +11 -13
- package/lib/cjs/Charts/Area.js.map +1 -1
- package/lib/cjs/Charts/Bar.js +11 -13
- package/lib/cjs/Charts/Bar.js.map +1 -1
- package/lib/cjs/Charts/Bubble.js +11 -13
- package/lib/cjs/Charts/Bubble.js.map +1 -1
- package/lib/cjs/Charts/CompactHorizontalBar.js +11 -13
- package/lib/cjs/Charts/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Charts/Donut.js +11 -13
- package/lib/cjs/Charts/Donut.js.map +1 -1
- package/lib/cjs/Charts/Histogram.js +11 -13
- package/lib/cjs/Charts/Histogram.js.map +1 -1
- package/lib/cjs/Charts/Line.js +11 -13
- package/lib/cjs/Charts/Line.js.map +1 -1
- package/lib/cjs/Charts/RadialTree.js +11 -13
- package/lib/cjs/Charts/RadialTree.js.map +1 -1
- package/lib/cjs/Charts/ScatterPlot.js +11 -13
- package/lib/cjs/Charts/ScatterPlot.js.map +1 -1
- package/lib/cjs/Charts/Venn.js +11 -13
- package/lib/cjs/Charts/Venn.js.map +1 -1
- package/lib/cjs/Skeleton.js +14 -16
- package/lib/cjs/Skeleton.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/Charts/Area.js +11 -11
- package/lib/es6/Charts/Area.js.map +1 -1
- package/lib/es6/Charts/Bar.js +11 -11
- package/lib/es6/Charts/Bar.js.map +1 -1
- package/lib/es6/Charts/Bubble.js +11 -11
- package/lib/es6/Charts/Bubble.js.map +1 -1
- package/lib/es6/Charts/CompactHorizontalBar.js +11 -11
- package/lib/es6/Charts/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Charts/Donut.js +11 -11
- package/lib/es6/Charts/Donut.js.map +1 -1
- package/lib/es6/Charts/Histogram.js +11 -11
- package/lib/es6/Charts/Histogram.js.map +1 -1
- package/lib/es6/Charts/Line.js +11 -11
- package/lib/es6/Charts/Line.js.map +1 -1
- package/lib/es6/Charts/RadialTree.js +11 -11
- package/lib/es6/Charts/RadialTree.js.map +1 -1
- package/lib/es6/Charts/ScatterPlot.js +11 -11
- package/lib/es6/Charts/ScatterPlot.js.map +1 -1
- package/lib/es6/Charts/Venn.js +11 -11
- package/lib/es6/Charts/Venn.js.map +1 -1
- package/lib/es6/Skeleton.js +13 -13
- package/lib/es6/Skeleton.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/esm/Charts/Area.mjs +23 -24
- package/lib/esm/Charts/Bar.mjs +22 -23
- package/lib/esm/Charts/Bubble.mjs +23 -24
- package/lib/esm/Charts/CompactHorizontalBar.mjs +21 -22
- package/lib/esm/Charts/Donut.mjs +24 -25
- package/lib/esm/Charts/Histogram.mjs +23 -24
- package/lib/esm/Charts/Line.mjs +24 -25
- package/lib/esm/Charts/RadialTree.mjs +22 -23
- package/lib/esm/Charts/ScatterPlot.mjs +23 -24
- package/lib/esm/Charts/Venn.mjs +23 -24
- package/lib/esm/Skeleton.mjs +57 -58
- package/lib/types/index.d.ts +1 -1
- package/package.json +3 -6
package/lib/esm/Skeleton.mjs
CHANGED
|
@@ -7,66 +7,65 @@ import x from "@babel/runtime/helpers/esm/createClass";
|
|
|
7
7
|
import R from "@babel/runtime/helpers/esm/inherits";
|
|
8
8
|
import P from "@babel/runtime/helpers/esm/createSuper";
|
|
9
9
|
import _ from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
|
-
import { sstyled as
|
|
11
|
-
import C, { sstyled as S, assignProps as E, Component as w } from "@semcore/core";
|
|
10
|
+
import { createComponent as C, sstyled as p, assignProps as E, Component as w } from "@semcore/core";
|
|
12
11
|
import s from "react";
|
|
13
12
|
import { Box as $ } from "@semcore/flex-box";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { localizedMessages as
|
|
18
|
-
var
|
|
13
|
+
import D from "@semcore/core/lib/utils/uniqueID";
|
|
14
|
+
import I from "@semcore/core/lib/utils/canUseDOM";
|
|
15
|
+
import O from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
16
|
+
import { localizedMessages as U } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
17
|
+
var N = ["y", "x", "amount", "width", "styles", "forwardRef"], A = (
|
|
19
18
|
/*__reshadow_css_start__*/
|
|
20
|
-
(
|
|
19
|
+
(p.insert(
|
|
21
20
|
/*__inner_css_start__*/
|
|
22
|
-
"@keyframes
|
|
23
|
-
"
|
|
21
|
+
"@keyframes pulse_1aad7{0%,to{opacity:1}50%{opacity:.4}}.___SSkeleton_1aad7_gg_{animation-name:pulse_1aad7;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:var(--durationAnim_1aad7);will-change:opacity}.___SSkeletonSVG_1aad7_gg_._theme_invert_1aad7_gg_{fill:var(--intergalactic-skeleton-bg, rgba(224, 225, 233, 0.8))}.___SSkeletonSVG_1aad7_gg_._theme_dark_1aad7_gg_{fill:var(--intergalactic-skeleton-bg-invert, rgba(255, 255, 255, 0.3))}.___SText_1aad7_gg_{box-sizing:border-box}@media (prefers-reduced-motion){.___SSkeleton_1aad7_gg_{animation-name:none}}",
|
|
22
|
+
"1aad7_gg_"
|
|
24
23
|
), {
|
|
25
|
-
__SSkeleton: "
|
|
26
|
-
"--durationAnim": "--
|
|
27
|
-
"@pulse": "
|
|
28
|
-
__SSkeletonSVG: "
|
|
29
|
-
_theme_invert: "
|
|
30
|
-
_theme_dark: "
|
|
31
|
-
__SText: "
|
|
24
|
+
__SSkeleton: "___SSkeleton_1aad7_gg_",
|
|
25
|
+
"--durationAnim": "--durationAnim_1aad7",
|
|
26
|
+
"@pulse": "pulse_1aad7",
|
|
27
|
+
__SSkeletonSVG: "___SSkeletonSVG_1aad7_gg_",
|
|
28
|
+
_theme_invert: "_theme_invert_1aad7_gg_",
|
|
29
|
+
_theme_dark: "_theme_dark_1aad7_gg_",
|
|
30
|
+
__SText: "___SText_1aad7_gg_"
|
|
32
31
|
})
|
|
33
|
-
),
|
|
32
|
+
), W = {
|
|
34
33
|
dark: "rgba(255, 255, 255, 0.3)",
|
|
35
34
|
invert: "rgba(224, 225, 233, 0.8)"
|
|
36
|
-
},
|
|
37
|
-
R(r,
|
|
38
|
-
var
|
|
35
|
+
}, v = /* @__PURE__ */ function(a) {
|
|
36
|
+
R(r, a);
|
|
37
|
+
var m = P(r);
|
|
39
38
|
function r() {
|
|
40
|
-
return b(this, r),
|
|
39
|
+
return b(this, r), m.apply(this, arguments);
|
|
41
40
|
}
|
|
42
41
|
return x(r, [{
|
|
43
42
|
key: "render",
|
|
44
43
|
value: function() {
|
|
45
|
-
var e = this.asProps, t, n = $,
|
|
46
|
-
|
|
47
|
-
var l =
|
|
48
|
-
return
|
|
49
|
-
durationAnim: "".concat(
|
|
44
|
+
var e = this.asProps, t, n = $, i = this.asProps;
|
|
45
|
+
i.Children;
|
|
46
|
+
var l = i.styles, d = i.duration, u = i.hidden, c = i.getI18nText;
|
|
47
|
+
return i.tag, u ? null : (t = p(l), /* @__PURE__ */ s.createElement(n, t.cn("SSkeleton", g({}, E({
|
|
48
|
+
durationAnim: "".concat(d, "ms"),
|
|
50
49
|
role: "img",
|
|
51
|
-
"aria-label":
|
|
50
|
+
"aria-label": c("loading")
|
|
52
51
|
}, e)))));
|
|
53
52
|
}
|
|
54
53
|
}]), r;
|
|
55
54
|
}(w);
|
|
56
|
-
_(
|
|
57
|
-
_(
|
|
58
|
-
_(
|
|
59
|
-
_(
|
|
55
|
+
_(v, "displayName", "Skeleton");
|
|
56
|
+
_(v, "style", A);
|
|
57
|
+
_(v, "enhance", [O(U)]);
|
|
58
|
+
_(v, "defaultProps", {
|
|
60
59
|
width: "100%",
|
|
61
60
|
height: "100%",
|
|
62
61
|
duration: 2e3
|
|
63
62
|
});
|
|
64
|
-
var
|
|
65
|
-
R(r,
|
|
66
|
-
var
|
|
63
|
+
var h = /* @__PURE__ */ function(a) {
|
|
64
|
+
R(r, a);
|
|
65
|
+
var m = P(r);
|
|
67
66
|
function r(o) {
|
|
68
67
|
var e;
|
|
69
|
-
return b(this, r), e =
|
|
68
|
+
return b(this, r), e = m.call(this, o), _(y(e), "svgRef", /* @__PURE__ */ s.createRef()), I() && o.observeParentSize && (e.observer = new ResizeObserver(e.handleResize.bind(y(e)))), e;
|
|
70
69
|
}
|
|
71
70
|
return x(r, [{
|
|
72
71
|
key: "componentDidMount",
|
|
@@ -91,42 +90,42 @@ var v = /* @__PURE__ */ function(i) {
|
|
|
91
90
|
value: function() {
|
|
92
91
|
var e = this.asProps.theme;
|
|
93
92
|
return {
|
|
94
|
-
gradientUrl:
|
|
93
|
+
gradientUrl: W[e]
|
|
95
94
|
};
|
|
96
95
|
}
|
|
97
96
|
}, {
|
|
98
97
|
key: "render",
|
|
99
98
|
value: function() {
|
|
100
|
-
var e = this.asProps, t, n = this.asProps,
|
|
101
|
-
return t =
|
|
99
|
+
var e = this.asProps, t, n = this.asProps, i = n.Children, l = n.styles, d = n.uid, u = n.theme, c = n.duration, S = L;
|
|
100
|
+
return t = p(l), /* @__PURE__ */ s.createElement(S, t.cn("SSkeletonSVG", g({}, E({
|
|
102
101
|
tag: "svg",
|
|
103
102
|
ref: this.svgRef,
|
|
104
103
|
preserveAspectRatio: "none",
|
|
105
104
|
theme: u,
|
|
106
|
-
durationAnim: "".concat(
|
|
105
|
+
durationAnim: "".concat(c, "ms")
|
|
107
106
|
}, e))), /* @__PURE__ */ s.createElement("defs", t.cn("defs", {}), /* @__PURE__ */ s.createElement("mask", t.cn("mask", {
|
|
108
|
-
id:
|
|
109
|
-
}), /* @__PURE__ */ s.createElement(
|
|
107
|
+
id: d
|
|
108
|
+
}), /* @__PURE__ */ s.createElement(i, t.cn("Children", {})))), /* @__PURE__ */ s.createElement("rect", t.cn("rect", {
|
|
110
109
|
x: "0",
|
|
111
110
|
y: "0",
|
|
112
111
|
width: "100%",
|
|
113
112
|
height: "100%",
|
|
114
|
-
mask: "url(#".concat(
|
|
113
|
+
mask: "url(#".concat(d, ")")
|
|
115
114
|
})));
|
|
116
115
|
}
|
|
117
116
|
}]), r;
|
|
118
117
|
}(w);
|
|
119
|
-
_(
|
|
120
|
-
_(
|
|
121
|
-
_(
|
|
122
|
-
_(
|
|
118
|
+
_(h, "displayName", "SkeletonSVG");
|
|
119
|
+
_(h, "enhance", [D()]);
|
|
120
|
+
_(h, "style", A);
|
|
121
|
+
_(h, "defaultProps", {
|
|
123
122
|
theme: "invert",
|
|
124
123
|
duration: 2e3
|
|
125
124
|
});
|
|
126
|
-
function
|
|
127
|
-
var
|
|
125
|
+
function j(a) {
|
|
126
|
+
var m = $, r = a.y, o = r === void 0 ? 0 : r, e = a.x, t = e === void 0 ? 0 : e, n = a.amount, i = n === void 0 ? 1 : n, l = a.width, d = l === void 0 ? "100%" : l, u = a.styles, c = a.forwardRef, S = M(a, N), T = Number(i), G = function(f) {
|
|
128
127
|
var k;
|
|
129
|
-
return k =
|
|
128
|
+
return k = p(u), /* @__PURE__ */ s.createElement(m, k.cn("SText", g({
|
|
130
129
|
tag: "rect",
|
|
131
130
|
rx: "4",
|
|
132
131
|
ry: "4",
|
|
@@ -138,16 +137,16 @@ function L(i) {
|
|
|
138
137
|
key: f,
|
|
139
138
|
y: o || 20 * f,
|
|
140
139
|
x: t,
|
|
141
|
-
ref:
|
|
142
|
-
width:
|
|
143
|
-
},
|
|
140
|
+
ref: c,
|
|
141
|
+
width: d
|
|
142
|
+
}, S));
|
|
144
143
|
}));
|
|
145
144
|
}
|
|
146
|
-
var
|
|
147
|
-
const
|
|
148
|
-
Text:
|
|
145
|
+
var L = C(v);
|
|
146
|
+
const ie = C(h, {
|
|
147
|
+
Text: j
|
|
149
148
|
});
|
|
150
149
|
export {
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
L as Skeleton,
|
|
151
|
+
ie as default
|
|
153
152
|
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BoxProps } from '@semcore/flex-box';
|
|
2
2
|
import { Intergalactic, UnknownProperties } from '@semcore/core';
|
|
3
|
-
import { UniqueIDProps } from '@semcore/
|
|
3
|
+
import { UniqueIDProps } from '@semcore/core/lib/utils/uniqueID';
|
|
4
4
|
|
|
5
5
|
/** @deprecated */
|
|
6
6
|
export interface ISkeletonProps extends SkeletonProps, UnknownProperties {}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/skeleton",
|
|
3
3
|
"description": "Semrush Skeleton Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "16.0.0-prerelease.4",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"types": "lib/types/index.d.ts",
|
|
@@ -14,13 +14,10 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/
|
|
18
|
-
"@semcore/flex-box": "5.41.1"
|
|
17
|
+
"@semcore/flex-box": "16.0.0-prerelease.4"
|
|
19
18
|
},
|
|
20
19
|
"peerDependencies": {
|
|
21
|
-
"@semcore/
|
|
22
|
-
"react": "16.8 - 18",
|
|
23
|
-
"react-dom": "16.8 - 18"
|
|
20
|
+
"@semcore/base-components": "^16.0.0-prerelease.4"
|
|
24
21
|
},
|
|
25
22
|
"repository": {
|
|
26
23
|
"type": "git",
|