@semcore/skeleton 16.0.1 → 16.0.2-prerelease.3
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/README.md +1 -37
- package/lib/cjs/Charts/Area.js +11 -12
- package/lib/cjs/Charts/Area.js.map +1 -1
- package/lib/cjs/Charts/Bar.js +11 -12
- package/lib/cjs/Charts/Bar.js.map +1 -1
- package/lib/cjs/Charts/Bubble.js +11 -12
- package/lib/cjs/Charts/Bubble.js.map +1 -1
- package/lib/cjs/Charts/CompactHorizontalBar.js +12 -13
- package/lib/cjs/Charts/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Charts/Donut.js +11 -12
- package/lib/cjs/Charts/Donut.js.map +1 -1
- package/lib/cjs/Charts/Histogram.js +11 -12
- package/lib/cjs/Charts/Histogram.js.map +1 -1
- package/lib/cjs/Charts/Line.js +11 -12
- package/lib/cjs/Charts/Line.js.map +1 -1
- package/lib/cjs/Charts/RadialTree.js +11 -12
- package/lib/cjs/Charts/RadialTree.js.map +1 -1
- package/lib/cjs/Charts/ScatterPlot.js +11 -12
- package/lib/cjs/Charts/ScatterPlot.js.map +1 -1
- package/lib/cjs/Charts/Venn.js +11 -12
- package/lib/cjs/Charts/Venn.js.map +1 -1
- package/lib/cjs/Charts/index.js +1 -1
- package/lib/cjs/Charts/index.js.map +1 -1
- package/lib/cjs/Skeleton.d.js.map +1 -1
- package/lib/cjs/Skeleton.js +30 -36
- package/lib/cjs/Skeleton.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/Charts/Area.js +10 -10
- package/lib/es6/Charts/Area.js.map +1 -1
- package/lib/es6/Charts/Bar.js +10 -10
- package/lib/es6/Charts/Bar.js.map +1 -1
- package/lib/es6/Charts/Bubble.js +10 -10
- 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 +10 -10
- package/lib/es6/Charts/Donut.js.map +1 -1
- package/lib/es6/Charts/Histogram.js +10 -10
- package/lib/es6/Charts/Histogram.js.map +1 -1
- package/lib/es6/Charts/Line.js +10 -10
- package/lib/es6/Charts/Line.js.map +1 -1
- package/lib/es6/Charts/RadialTree.js +10 -10
- package/lib/es6/Charts/RadialTree.js.map +1 -1
- package/lib/es6/Charts/ScatterPlot.js +10 -10
- package/lib/es6/Charts/ScatterPlot.js.map +1 -1
- package/lib/es6/Charts/Venn.js +10 -10
- package/lib/es6/Charts/Venn.js.map +1 -1
- package/lib/es6/Charts/index.js.map +1 -1
- package/lib/es6/Skeleton.d.js.map +1 -1
- package/lib/es6/Skeleton.js +28 -32
- package/lib/es6/Skeleton.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/Charts/Area.mjs +10 -10
- package/lib/esm/Charts/Bar.mjs +10 -10
- package/lib/esm/Charts/Bubble.mjs +10 -10
- package/lib/esm/Charts/CompactHorizontalBar.mjs +11 -11
- package/lib/esm/Charts/Donut.mjs +10 -10
- package/lib/esm/Charts/Histogram.mjs +10 -10
- package/lib/esm/Charts/Line.mjs +10 -10
- package/lib/esm/Charts/RadialTree.mjs +10 -10
- package/lib/esm/Charts/ScatterPlot.mjs +10 -10
- package/lib/esm/Charts/Venn.mjs +10 -10
- package/lib/esm/Skeleton.mjs +30 -33
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/types/index.d.ts +3 -3
- package/package.json +4 -4
package/lib/esm/Skeleton.mjs
CHANGED
|
@@ -1,37 +1,41 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
4
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
4
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
6
5
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
8
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
9
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
9
10
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
10
11
|
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { Box } from "@semcore/flex-box";
|
|
13
|
-
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
14
12
|
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
15
13
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
14
|
+
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
15
|
+
import { Box } from "@semcore/flex-box";
|
|
16
|
+
import React from "react";
|
|
16
17
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
17
18
|
var _excluded = ["y", "x", "amount", "width", "styles", "forwardRef"];
|
|
19
|
+
function _callSuper(t, o, e) {
|
|
20
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
21
|
+
}
|
|
18
22
|
/*!__reshadow-styles__:"./style/skeleton.shadow.css"*/
|
|
19
23
|
var style = (
|
|
20
24
|
/*__reshadow_css_start__*/
|
|
21
25
|
(sstyled.insert(
|
|
22
26
|
/*__inner_css_start__*/
|
|
23
|
-
"@keyframes
|
|
27
|
+
"@keyframes pulse_1p0y7{0%,to{opacity:1}50%{opacity:.4}}.___SSkeleton_1p0y7_gg_{animation-name:pulse_1p0y7;animation-iteration-count:infinite;animation-timing-function:ease-in-out;animation-duration:var(--durationAnim_1p0y7);will-change:opacity}.___SSkeletonSVG_1p0y7_gg_._theme_invert_1p0y7_gg_{fill:var(--intergalactic-skeleton-bg, rgba(224, 225, 233, 0.8))}.___SSkeletonSVG_1p0y7_gg_._theme_dark_1p0y7_gg_{fill:var(--intergalactic-skeleton-bg-invert, rgba(255, 255, 255, 0.3))}.___SText_1p0y7_gg_{box-sizing:border-box}@media (prefers-reduced-motion){.___SSkeleton_1p0y7_gg_{animation-name:none}}",
|
|
24
28
|
/*__inner_css_end__*/
|
|
25
|
-
"
|
|
29
|
+
"1p0y7_gg_"
|
|
26
30
|
), /*__reshadow_css_end__*/
|
|
27
31
|
{
|
|
28
|
-
"__SSkeleton": "
|
|
29
|
-
"--durationAnim": "--
|
|
30
|
-
"@pulse": "
|
|
31
|
-
"__SSkeletonSVG": "
|
|
32
|
-
"_theme_invert": "
|
|
33
|
-
"_theme_dark": "
|
|
34
|
-
"__SText": "
|
|
32
|
+
"__SSkeleton": "___SSkeleton_1p0y7_gg_",
|
|
33
|
+
"--durationAnim": "--durationAnim_1p0y7",
|
|
34
|
+
"@pulse": "pulse_1p0y7",
|
|
35
|
+
"__SSkeletonSVG": "___SSkeletonSVG_1p0y7_gg_",
|
|
36
|
+
"_theme_invert": "_theme_invert_1p0y7_gg_",
|
|
37
|
+
"_theme_dark": "_theme_dark_1p0y7_gg_",
|
|
38
|
+
"__SText": "___SText_1p0y7_gg_"
|
|
35
39
|
})
|
|
36
40
|
);
|
|
37
41
|
var MAP_COLOR_THEME = {
|
|
@@ -39,21 +43,17 @@ var MAP_COLOR_THEME = {
|
|
|
39
43
|
invert: "rgba(224, 225, 233, 0.8)"
|
|
40
44
|
};
|
|
41
45
|
var SkeletonRoot = /* @__PURE__ */ function(_Component) {
|
|
42
|
-
_inherits(SkeletonRoot2, _Component);
|
|
43
|
-
var _super = _createSuper(SkeletonRoot2);
|
|
44
46
|
function SkeletonRoot2() {
|
|
45
47
|
_classCallCheck(this, SkeletonRoot2);
|
|
46
|
-
return
|
|
48
|
+
return _callSuper(this, SkeletonRoot2, arguments);
|
|
47
49
|
}
|
|
48
|
-
|
|
50
|
+
_inherits(SkeletonRoot2, _Component);
|
|
51
|
+
return _createClass(SkeletonRoot2, [{
|
|
49
52
|
key: "render",
|
|
50
53
|
value: function render() {
|
|
51
54
|
var _ref = this.asProps, _ref3;
|
|
52
55
|
var SSkeleton = Box;
|
|
53
|
-
var _this$asProps = this.asProps;
|
|
54
|
-
_this$asProps.Children;
|
|
55
|
-
var styles = _this$asProps.styles, duration = _this$asProps.duration, hidden = _this$asProps.hidden, getI18nText = _this$asProps.getI18nText;
|
|
56
|
-
_this$asProps.tag;
|
|
56
|
+
var _this$asProps = this.asProps, styles = _this$asProps.styles, duration = _this$asProps.duration, hidden = _this$asProps.hidden, getI18nText = _this$asProps.getI18nText;
|
|
57
57
|
if (hidden) return null;
|
|
58
58
|
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SSkeleton, _ref3.cn("SSkeleton", _objectSpread({}, assignProps({
|
|
59
59
|
"durationAnim": "".concat(duration, "ms"),
|
|
@@ -62,7 +62,6 @@ var SkeletonRoot = /* @__PURE__ */ function(_Component) {
|
|
|
62
62
|
}, _ref))));
|
|
63
63
|
}
|
|
64
64
|
}]);
|
|
65
|
-
return SkeletonRoot2;
|
|
66
65
|
}(Component);
|
|
67
66
|
_defineProperty(SkeletonRoot, "displayName", "Skeleton");
|
|
68
67
|
_defineProperty(SkeletonRoot, "style", style);
|
|
@@ -73,29 +72,28 @@ _defineProperty(SkeletonRoot, "defaultProps", {
|
|
|
73
72
|
duration: 2e3
|
|
74
73
|
});
|
|
75
74
|
var SkeletonSVG = /* @__PURE__ */ function(_Component2) {
|
|
76
|
-
_inherits(SkeletonSVG2, _Component2);
|
|
77
|
-
var _super2 = _createSuper(SkeletonSVG2);
|
|
78
75
|
function SkeletonSVG2(props) {
|
|
79
76
|
var _this;
|
|
80
77
|
_classCallCheck(this, SkeletonSVG2);
|
|
81
|
-
_this =
|
|
82
|
-
_defineProperty(
|
|
78
|
+
_this = _callSuper(this, SkeletonSVG2, [props]);
|
|
79
|
+
_defineProperty(_this, "svgRef", /* @__PURE__ */ React.createRef());
|
|
83
80
|
if (canUseDOM() && props.observeParentSize) {
|
|
84
|
-
_this.observer = new ResizeObserver(_this.handleResize.bind(
|
|
81
|
+
_this.observer = new ResizeObserver(_this.handleResize.bind(_this));
|
|
85
82
|
}
|
|
86
83
|
return _this;
|
|
87
84
|
}
|
|
88
|
-
|
|
85
|
+
_inherits(SkeletonSVG2, _Component2);
|
|
86
|
+
return _createClass(SkeletonSVG2, [{
|
|
89
87
|
key: "componentDidMount",
|
|
90
88
|
value: function componentDidMount() {
|
|
91
89
|
var _this$observer, _this$svgRef$current;
|
|
92
|
-
(_this$observer = this.observer) === null || _this$observer === void 0
|
|
90
|
+
(_this$observer = this.observer) === null || _this$observer === void 0 || _this$observer.observe((_this$svgRef$current = this.svgRef.current) === null || _this$svgRef$current === void 0 ? void 0 : _this$svgRef$current.parentElement);
|
|
93
91
|
}
|
|
94
92
|
}, {
|
|
95
93
|
key: "componentWillUnmount",
|
|
96
94
|
value: function componentWillUnmount() {
|
|
97
95
|
var _this$observer2;
|
|
98
|
-
(_this$observer2 = this.observer) === null || _this$observer2 === void 0
|
|
96
|
+
(_this$observer2 = this.observer) === null || _this$observer2 === void 0 || _this$observer2.disconnect();
|
|
99
97
|
}
|
|
100
98
|
}, {
|
|
101
99
|
key: "handleResize",
|
|
@@ -137,7 +135,6 @@ var SkeletonSVG = /* @__PURE__ */ function(_Component2) {
|
|
|
137
135
|
})));
|
|
138
136
|
}
|
|
139
137
|
}]);
|
|
140
|
-
return SkeletonSVG2;
|
|
141
138
|
}(Component);
|
|
142
139
|
_defineProperty(SkeletonSVG, "displayName", "SkeletonSVG");
|
|
143
140
|
_defineProperty(SkeletonSVG, "enhance", [uniqueIDEnhancement()]);
|
|
@@ -159,7 +156,7 @@ function Text(props) {
|
|
|
159
156
|
"height": "8"
|
|
160
157
|
}, props2)));
|
|
161
158
|
};
|
|
162
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, _toConsumableArray(Array(amountLine)).map(function(
|
|
159
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, _toConsumableArray(Array(amountLine)).map(function(_el, index) {
|
|
163
160
|
return renderRect(_objectSpread({
|
|
164
161
|
key: index,
|
|
165
162
|
y: y || 20 * index,
|
|
@@ -6,12 +6,12 @@ import it from "./it.json.mjs";
|
|
|
6
6
|
import ja from "./ja.json.mjs";
|
|
7
7
|
import ko from "./ko.json.mjs";
|
|
8
8
|
import nl from "./nl.json.mjs";
|
|
9
|
+
import pl from "./pl.json.mjs";
|
|
9
10
|
import pt from "./pt.json.mjs";
|
|
11
|
+
import sv from "./sv.json.mjs";
|
|
10
12
|
import tr from "./tr.json.mjs";
|
|
11
13
|
import vi from "./vi.json.mjs";
|
|
12
14
|
import zh from "./zh.json.mjs";
|
|
13
|
-
import pl from "./pl.json.mjs";
|
|
14
|
-
import sv from "./sv.json.mjs";
|
|
15
15
|
var localizedMessages = {
|
|
16
16
|
de,
|
|
17
17
|
en,
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Intergalactic, UnknownProperties } from '@semcore/core';
|
|
2
|
+
import type { UniqueIDProps } from '@semcore/core/lib/utils/uniqueID';
|
|
3
|
+
import type { BoxProps } from '@semcore/flex-box';
|
|
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": "16.0.
|
|
4
|
+
"version": "16.0.2-prerelease.3",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"types": "lib/types/index.d.ts",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/flex-box": "16.0.
|
|
17
|
+
"@semcore/flex-box": "16.0.2-prerelease.3"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@semcore/base-components": "^16.0.
|
|
20
|
+
"@semcore/base-components": "^16.0.2-prerelease.3"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"directory": "semcore/skeleton"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@
|
|
28
|
+
"@semcore/core": "16.0.0",
|
|
29
29
|
"@semcore/testing-utils": "1.0.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|