@semcore/skeleton 5.42.0-prerelease.9 → 5.42.1-prerelease.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/CHANGELOG.md +8 -2
- package/lib/cjs/Charts/Area.js +9 -9
- package/lib/cjs/Charts/Bar.js +9 -9
- package/lib/cjs/Charts/Bubble.js +9 -9
- package/lib/cjs/Charts/CompactHorizontalBar.js +9 -9
- package/lib/cjs/Charts/Donut.js +9 -9
- package/lib/cjs/Charts/Histogram.js +9 -9
- package/lib/cjs/Charts/Line.js +9 -9
- package/lib/cjs/Charts/RadialTree.js +9 -9
- package/lib/cjs/Charts/ScatterPlot.js +9 -9
- package/lib/cjs/Charts/Venn.js +9 -9
- package/lib/cjs/Skeleton.js +8 -8
- package/lib/es6/Charts/Area.js +9 -9
- package/lib/es6/Charts/Bar.js +9 -9
- package/lib/es6/Charts/Bubble.js +9 -9
- package/lib/es6/Charts/CompactHorizontalBar.js +9 -9
- package/lib/es6/Charts/Donut.js +9 -9
- package/lib/es6/Charts/Histogram.js +9 -9
- package/lib/es6/Charts/Line.js +9 -9
- package/lib/es6/Charts/RadialTree.js +9 -9
- package/lib/es6/Charts/ScatterPlot.js +9 -9
- package/lib/es6/Charts/Venn.js +9 -9
- package/lib/es6/Skeleton.js +8 -8
- package/lib/esm/Charts/Area.mjs +37 -0
- package/lib/esm/Charts/Bar.mjs +46 -0
- package/lib/esm/Charts/Bubble.mjs +34 -0
- package/lib/esm/Charts/CompactHorizontalBar.mjs +34 -0
- package/lib/esm/Charts/Donut.mjs +40 -0
- package/lib/esm/Charts/Histogram.mjs +46 -0
- package/lib/esm/Charts/Line.mjs +37 -0
- package/lib/esm/Charts/RadialTree.mjs +34 -0
- package/lib/esm/Charts/ScatterPlot.mjs +34 -0
- package/lib/esm/Charts/Venn.mjs +34 -0
- package/lib/esm/Skeleton.mjs +153 -0
- package/lib/esm/index.mjs +24 -0
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +33 -0
- package/lib/esm/translations/de.json.mjs +7 -0
- package/lib/esm/translations/en.json.mjs +7 -0
- package/lib/esm/translations/es.json.mjs +7 -0
- package/lib/esm/translations/fr.json.mjs +7 -0
- package/lib/esm/translations/it.json.mjs +7 -0
- package/lib/esm/translations/ja.json.mjs +7 -0
- package/lib/esm/translations/ko.json.mjs +7 -0
- package/lib/esm/translations/nl.json.mjs +7 -0
- package/lib/esm/translations/pl.json.mjs +7 -0
- package/lib/esm/translations/pt.json.mjs +7 -0
- package/lib/esm/translations/sv.json.mjs +7 -0
- package/lib/esm/translations/tr.json.mjs +7 -0
- package/lib/esm/translations/vi.json.mjs +7 -0
- package/lib/esm/translations/zh.json.mjs +7 -0
- package/package.json +10 -5
- package/vite.config.ts +17 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import z from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import M from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import y from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
4
|
+
import g from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
|
+
import b from "@babel/runtime/helpers/esm/classCallCheck";
|
|
6
|
+
import x from "@babel/runtime/helpers/esm/createClass";
|
|
7
|
+
import R from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import P from "@babel/runtime/helpers/esm/createSuper";
|
|
9
|
+
import _ from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
|
+
import { sstyled as D } from "@semcore/utils/lib/core/index";
|
|
11
|
+
import C, { sstyled as S, assignProps as E, Component as w } from "@semcore/core";
|
|
12
|
+
import s from "react";
|
|
13
|
+
import { Box as $ } from "@semcore/flex-box";
|
|
14
|
+
import I from "@semcore/utils/lib/uniqueID";
|
|
15
|
+
import O from "@semcore/utils/lib/canUseDOM";
|
|
16
|
+
import U from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
17
|
+
import { localizedMessages as N } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
18
|
+
var W = ["y", "x", "amount", "width", "styles", "forwardRef"], A = (
|
|
19
|
+
/*__reshadow_css_start__*/
|
|
20
|
+
(D.insert(
|
|
21
|
+
/*__inner_css_start__*/
|
|
22
|
+
"@keyframes pulse_1ihc1{0%,to{opacity:1}50%{opacity:.4}}.___SSkeleton_1ihc1_gg_{animation-name:pulse_1ihc1;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:var(--durationAnim_1ihc1);will-change:opacity}.___SSkeletonSVG_1ihc1_gg_._theme_invert_1ihc1_gg_{fill:var(--intergalactic-skeleton-bg, rgba(224, 225, 233, 0.8))}.___SSkeletonSVG_1ihc1_gg_._theme_dark_1ihc1_gg_{fill:var(--intergalactic-skeleton-bg-invert, rgba(255, 255, 255, 0.3))}.___SText_1ihc1_gg_{box-sizing:border-box}@media (prefers-reduced-motion){.___SSkeleton_1ihc1_gg_{animation-name:none}}",
|
|
23
|
+
"1ihc1_gg_"
|
|
24
|
+
), {
|
|
25
|
+
__SSkeleton: "___SSkeleton_1ihc1_gg_",
|
|
26
|
+
"--durationAnim": "--durationAnim_1ihc1",
|
|
27
|
+
"@pulse": "pulse_1ihc1",
|
|
28
|
+
__SSkeletonSVG: "___SSkeletonSVG_1ihc1_gg_",
|
|
29
|
+
_theme_invert: "_theme_invert_1ihc1_gg_",
|
|
30
|
+
_theme_dark: "_theme_dark_1ihc1_gg_",
|
|
31
|
+
__SText: "___SText_1ihc1_gg_"
|
|
32
|
+
})
|
|
33
|
+
), j = {
|
|
34
|
+
dark: "rgba(255, 255, 255, 0.3)",
|
|
35
|
+
invert: "rgba(224, 225, 233, 0.8)"
|
|
36
|
+
}, d = /* @__PURE__ */ function(i) {
|
|
37
|
+
R(r, i);
|
|
38
|
+
var c = P(r);
|
|
39
|
+
function r() {
|
|
40
|
+
return b(this, r), c.apply(this, arguments);
|
|
41
|
+
}
|
|
42
|
+
return x(r, [{
|
|
43
|
+
key: "render",
|
|
44
|
+
value: function() {
|
|
45
|
+
var e = this.asProps, t, n = $, a = this.asProps;
|
|
46
|
+
a.Children;
|
|
47
|
+
var l = a.styles, m = a.duration, u = a.hidden, h = a.getI18nText;
|
|
48
|
+
return a.tag, u ? null : (t = S(l), /* @__PURE__ */ s.createElement(n, t.cn("SSkeleton", g({}, E({
|
|
49
|
+
durationAnim: "".concat(m, "ms"),
|
|
50
|
+
role: "img",
|
|
51
|
+
"aria-label": h("loading")
|
|
52
|
+
}, e)))));
|
|
53
|
+
}
|
|
54
|
+
}]), r;
|
|
55
|
+
}(w);
|
|
56
|
+
_(d, "displayName", "Skeleton");
|
|
57
|
+
_(d, "style", A);
|
|
58
|
+
_(d, "enhance", [U(N)]);
|
|
59
|
+
_(d, "defaultProps", {
|
|
60
|
+
width: "100%",
|
|
61
|
+
height: "100%",
|
|
62
|
+
duration: 2e3
|
|
63
|
+
});
|
|
64
|
+
var v = /* @__PURE__ */ function(i) {
|
|
65
|
+
R(r, i);
|
|
66
|
+
var c = P(r);
|
|
67
|
+
function r(o) {
|
|
68
|
+
var e;
|
|
69
|
+
return b(this, r), e = c.call(this, o), _(y(e), "svgRef", /* @__PURE__ */ s.createRef()), O() && o.observeParentSize && (e.observer = new ResizeObserver(e.handleResize.bind(y(e)))), e;
|
|
70
|
+
}
|
|
71
|
+
return x(r, [{
|
|
72
|
+
key: "componentDidMount",
|
|
73
|
+
value: function() {
|
|
74
|
+
var e, t;
|
|
75
|
+
(e = this.observer) === null || e === void 0 || e.observe((t = this.svgRef.current) === null || t === void 0 ? void 0 : t.parentElement);
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: "componentWillUnmount",
|
|
79
|
+
value: function() {
|
|
80
|
+
var e;
|
|
81
|
+
(e = this.observer) === null || e === void 0 || e.disconnect();
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
key: "handleResize",
|
|
85
|
+
value: function(e) {
|
|
86
|
+
var t = e[0].target, n = this.svgRef.current;
|
|
87
|
+
t && n && n.setAttribute("width", "100%");
|
|
88
|
+
}
|
|
89
|
+
}, {
|
|
90
|
+
key: "setContext",
|
|
91
|
+
value: function() {
|
|
92
|
+
var e = this.asProps.theme;
|
|
93
|
+
return {
|
|
94
|
+
gradientUrl: j[e]
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
key: "render",
|
|
99
|
+
value: function() {
|
|
100
|
+
var e = this.asProps, t, n = this.asProps, a = n.Children, l = n.styles, m = n.uid, u = n.theme, h = n.duration, p = q;
|
|
101
|
+
return t = S(l), /* @__PURE__ */ s.createElement(p, t.cn("SSkeletonSVG", g({}, E({
|
|
102
|
+
tag: "svg",
|
|
103
|
+
ref: this.svgRef,
|
|
104
|
+
preserveAspectRatio: "none",
|
|
105
|
+
theme: u,
|
|
106
|
+
durationAnim: "".concat(h, "ms")
|
|
107
|
+
}, e))), /* @__PURE__ */ s.createElement("defs", t.cn("defs", {}), /* @__PURE__ */ s.createElement("mask", t.cn("mask", {
|
|
108
|
+
id: m
|
|
109
|
+
}), /* @__PURE__ */ s.createElement(a, t.cn("Children", {})))), /* @__PURE__ */ s.createElement("rect", t.cn("rect", {
|
|
110
|
+
x: "0",
|
|
111
|
+
y: "0",
|
|
112
|
+
width: "100%",
|
|
113
|
+
height: "100%",
|
|
114
|
+
mask: "url(#".concat(m, ")")
|
|
115
|
+
})));
|
|
116
|
+
}
|
|
117
|
+
}]), r;
|
|
118
|
+
}(w);
|
|
119
|
+
_(v, "displayName", "SkeletonSVG");
|
|
120
|
+
_(v, "enhance", [I()]);
|
|
121
|
+
_(v, "style", A);
|
|
122
|
+
_(v, "defaultProps", {
|
|
123
|
+
theme: "invert",
|
|
124
|
+
duration: 2e3
|
|
125
|
+
});
|
|
126
|
+
function L(i) {
|
|
127
|
+
var c = $, r = i.y, o = r === void 0 ? 0 : r, e = i.x, t = e === void 0 ? 0 : e, n = i.amount, a = n === void 0 ? 1 : n, l = i.width, m = l === void 0 ? "100%" : l, u = i.styles, h = i.forwardRef, p = M(i, W), T = Number(a), G = function(f) {
|
|
128
|
+
var k;
|
|
129
|
+
return k = S(u), /* @__PURE__ */ s.createElement(c, k.cn("SText", g({
|
|
130
|
+
tag: "rect",
|
|
131
|
+
rx: "4",
|
|
132
|
+
ry: "4",
|
|
133
|
+
height: "8"
|
|
134
|
+
}, f)));
|
|
135
|
+
};
|
|
136
|
+
return /* @__PURE__ */ s.createElement(s.Fragment, null, z(Array(T)).map(function(V, f) {
|
|
137
|
+
return G(g({
|
|
138
|
+
key: f,
|
|
139
|
+
y: o || 20 * f,
|
|
140
|
+
x: t,
|
|
141
|
+
ref: h,
|
|
142
|
+
width: m
|
|
143
|
+
}, p));
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
var q = C(d);
|
|
147
|
+
const _e = C(v, {
|
|
148
|
+
Text: L
|
|
149
|
+
});
|
|
150
|
+
export {
|
|
151
|
+
q as Skeleton,
|
|
152
|
+
_e as default
|
|
153
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as a } from "./Skeleton.mjs";
|
|
2
|
+
import { default as o } from "./Charts/Histogram.mjs";
|
|
3
|
+
import { default as f } from "./Charts/Donut.mjs";
|
|
4
|
+
import { default as m } from "./Charts/Bar.mjs";
|
|
5
|
+
import { default as d } from "./Charts/CompactHorizontalBar.mjs";
|
|
6
|
+
import { default as s } from "./Charts/Area.mjs";
|
|
7
|
+
import { default as C } from "./Charts/Line.mjs";
|
|
8
|
+
import { default as h } from "./Charts/Venn.mjs";
|
|
9
|
+
import { default as i } from "./Charts/ScatterPlot.mjs";
|
|
10
|
+
import { default as b } from "./Charts/Bubble.mjs";
|
|
11
|
+
import { default as H } from "./Charts/RadialTree.mjs";
|
|
12
|
+
export {
|
|
13
|
+
s as AreaChartSkeleton,
|
|
14
|
+
m as BarChartSkeleton,
|
|
15
|
+
b as BubbleChartSkeleton,
|
|
16
|
+
d as CompactHorizontalBarChartSkeleton,
|
|
17
|
+
f as DonutChartSkeleton,
|
|
18
|
+
o as HistogramChartSkeleton,
|
|
19
|
+
C as LineChartSkeleton,
|
|
20
|
+
H as RadialTreeChartSkeleton,
|
|
21
|
+
i as ScatterPlotChartSkeleton,
|
|
22
|
+
h as VennChartSkeleton,
|
|
23
|
+
a as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import r from "./de.json.mjs";
|
|
2
|
+
import o from "./en.json.mjs";
|
|
3
|
+
import m from "./es.json.mjs";
|
|
4
|
+
import t from "./fr.json.mjs";
|
|
5
|
+
import i from "./it.json.mjs";
|
|
6
|
+
import p from "./ja.json.mjs";
|
|
7
|
+
import f from "./ko.json.mjs";
|
|
8
|
+
import e from "./nl.json.mjs";
|
|
9
|
+
import s from "./pt.json.mjs";
|
|
10
|
+
import a from "./tr.json.mjs";
|
|
11
|
+
import l from "./vi.json.mjs";
|
|
12
|
+
import v from "./zh.json.mjs";
|
|
13
|
+
import d from "./pl.json.mjs";
|
|
14
|
+
import n from "./sv.json.mjs";
|
|
15
|
+
var B = {
|
|
16
|
+
de: r,
|
|
17
|
+
en: o,
|
|
18
|
+
es: m,
|
|
19
|
+
fr: t,
|
|
20
|
+
it: i,
|
|
21
|
+
ja: p,
|
|
22
|
+
ko: f,
|
|
23
|
+
nl: e,
|
|
24
|
+
pt: s,
|
|
25
|
+
tr: a,
|
|
26
|
+
vi: l,
|
|
27
|
+
zh: v,
|
|
28
|
+
pl: d,
|
|
29
|
+
sv: n
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
B as localizedMessages
|
|
33
|
+
};
|
package/package.json
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/skeleton",
|
|
3
3
|
"description": "Semrush Skeleton Component",
|
|
4
|
-
"version": "5.42.
|
|
4
|
+
"version": "5.42.1-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"types": "lib/types/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
|
+
"exports": {
|
|
12
|
+
"require": "./lib/cjs/index.js",
|
|
13
|
+
"import": "./lib/esm/index.mjs",
|
|
14
|
+
"types": "./lib/types/index.d.ts"
|
|
15
|
+
},
|
|
11
16
|
"dependencies": {
|
|
12
|
-
"@semcore/utils": "4.
|
|
13
|
-
"@semcore/flex-box": "5.41.
|
|
17
|
+
"@semcore/utils": "4.48.1-prerelease.0",
|
|
18
|
+
"@semcore/flex-box": "5.41.1-prerelease.0"
|
|
14
19
|
},
|
|
15
20
|
"peerDependencies": {
|
|
16
|
-
"@semcore/core": "^2.39.
|
|
21
|
+
"@semcore/core": "^2.39.1-prerelease.0",
|
|
17
22
|
"react": "16.8 - 18",
|
|
18
23
|
"react-dom": "16.8 - 18"
|
|
19
24
|
},
|
|
@@ -27,6 +32,6 @@
|
|
|
27
32
|
"@semcore/testing-utils": "1.0.0"
|
|
28
33
|
},
|
|
29
34
|
"scripts": {
|
|
30
|
-
"build": "pnpm semcore-builder --source=js"
|
|
35
|
+
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|
|
31
36
|
}
|
|
32
37
|
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineConfig, mergeConfig } from 'vite';
|
|
2
|
+
|
|
3
|
+
import viteConfig from '../../commonVite.config';
|
|
4
|
+
|
|
5
|
+
export default mergeConfig(
|
|
6
|
+
viteConfig,
|
|
7
|
+
defineConfig({
|
|
8
|
+
build: {
|
|
9
|
+
lib: {
|
|
10
|
+
entry: './src/index.js',
|
|
11
|
+
},
|
|
12
|
+
rollupOptions: {
|
|
13
|
+
external: ['react', 'react-dom', 'react/jsx-runtime', /@babel\/runtime\/*/, /@semcore\/*/],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
}),
|
|
17
|
+
);
|