@semcore/spin-container 5.0.5 → 5.1.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 +6 -0
- package/lib/cjs/SpinContainer.js +7 -7
- package/lib/cjs/index.d.ts +38 -0
- package/lib/cjs/index.js +2 -19
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/spin-container.shadow.css +1 -0
- package/lib/es6/SpinContainer.js +7 -7
- package/lib/es6/index.d.ts +38 -0
- package/lib/es6/index.js +0 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/spin-container.shadow.css +1 -0
- package/package.json +4 -1
- package/src/index.js +0 -1
- package/src/style/spin-container.shadow.css +1 -0
package/CHANGELOG.md
CHANGED
package/lib/cjs/SpinContainer.js
CHANGED
|
@@ -52,16 +52,16 @@ var style = (
|
|
|
52
52
|
/*__reshadow_css_start__*/
|
|
53
53
|
_core.sstyled.insert(
|
|
54
54
|
/*__inner_css_start__*/
|
|
55
|
-
".
|
|
55
|
+
".___SSpinContainer_umh1i_gg_{z-index:0;position:relative;display:block;overflow:hidden}.___SContent_umh1i_gg_{z-index:0;position:relative}.___SOverlay_umh1i_gg_{z-index:1;display:flex;width:100%;height:100%;justify-content:center;align-items:center;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.85)}.___SOverlay_umh1i_gg_.__background_umh1i_gg_{background:var(--background_cfhiws)}"
|
|
56
56
|
/*__inner_css_end__*/
|
|
57
|
-
, "
|
|
57
|
+
, "cfhiws_gg_")
|
|
58
58
|
/*__reshadow_css_end__*/
|
|
59
59
|
, {
|
|
60
|
-
"__SSpinContainer": "
|
|
61
|
-
"__SContent": "
|
|
62
|
-
"__SOverlay": "
|
|
63
|
-
"_background": "
|
|
64
|
-
"--background": "--
|
|
60
|
+
"__SSpinContainer": "___SSpinContainer_umh1i_gg_",
|
|
61
|
+
"__SContent": "___SContent_umh1i_gg_",
|
|
62
|
+
"__SOverlay": "___SOverlay_umh1i_gg_",
|
|
63
|
+
"_background": "__background_umh1i_gg_",
|
|
64
|
+
"--background": "--background_cfhiws"
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
var SpinContainerRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PropGetterFn, ReturnEl, CProps } from '@semcore/core';
|
|
2
|
+
import { ISpinProps } from '@semcore/spin';
|
|
3
|
+
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
4
|
+
|
|
5
|
+
export interface ISpinContainerProps extends IBoxProps, ISpinProps {
|
|
6
|
+
/**
|
|
7
|
+
* Color of container spinner; you can use your own color
|
|
8
|
+
*/
|
|
9
|
+
background?: string;
|
|
10
|
+
/** Duration of animation displaying in ms
|
|
11
|
+
* @default 200
|
|
12
|
+
*/
|
|
13
|
+
duration?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Property responsible for displaying the spinner
|
|
16
|
+
* */
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ISpinContainerContext {
|
|
21
|
+
getOverlayProps: PropGetterFn;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ISpinContainerOverlayProps extends IBoxProps {
|
|
25
|
+
/**
|
|
26
|
+
* Css background; you can use your own color
|
|
27
|
+
*/
|
|
28
|
+
background?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const SpinContainer: (<T>(
|
|
32
|
+
props: CProps<ISpinContainerProps & T, ISpinContainerContext>,
|
|
33
|
+
) => ReturnEl) & {
|
|
34
|
+
Content: typeof Box;
|
|
35
|
+
Overlay: <T>(props: ISpinContainerOverlayProps & T) => ReturnEl;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default SpinContainer;
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
var _exportNames = {};
|
|
9
8
|
Object.defineProperty(exports, "default", {
|
|
10
9
|
enumerable: true,
|
|
11
10
|
get: function get() {
|
|
@@ -13,21 +12,5 @@ Object.defineProperty(exports, "default", {
|
|
|
13
12
|
}
|
|
14
13
|
});
|
|
15
14
|
|
|
16
|
-
var _SpinContainer =
|
|
17
|
-
|
|
18
|
-
Object.keys(_SpinContainer).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
21
|
-
if (key in exports && exports[key] === _SpinContainer[key]) return;
|
|
22
|
-
Object.defineProperty(exports, key, {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function get() {
|
|
25
|
-
return _SpinContainer[key];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
-
|
|
32
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
var _SpinContainer = _interopRequireDefault(require("./SpinContainer"));
|
|
33
16
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './SpinContainer';\n"],"file":"index.js"}
|
package/lib/es6/SpinContainer.js
CHANGED
|
@@ -30,16 +30,16 @@ var style = (
|
|
|
30
30
|
/*__reshadow_css_start__*/
|
|
31
31
|
_sstyled.insert(
|
|
32
32
|
/*__inner_css_start__*/
|
|
33
|
-
".
|
|
33
|
+
".___SSpinContainer_umh1i_gg_{z-index:0;position:relative;display:block;overflow:hidden}.___SContent_umh1i_gg_{z-index:0;position:relative}.___SOverlay_umh1i_gg_{z-index:1;display:flex;width:100%;height:100%;justify-content:center;align-items:center;position:absolute;top:0;left:0;background-color:hsla(0,0%,100%,.85)}.___SOverlay_umh1i_gg_.__background_umh1i_gg_{background:var(--background_cfhiws)}"
|
|
34
34
|
/*__inner_css_end__*/
|
|
35
|
-
, "
|
|
35
|
+
, "cfhiws_gg_")
|
|
36
36
|
/*__reshadow_css_end__*/
|
|
37
37
|
, {
|
|
38
|
-
"__SSpinContainer": "
|
|
39
|
-
"__SContent": "
|
|
40
|
-
"__SOverlay": "
|
|
41
|
-
"_background": "
|
|
42
|
-
"--background": "--
|
|
38
|
+
"__SSpinContainer": "___SSpinContainer_umh1i_gg_",
|
|
39
|
+
"__SContent": "___SContent_umh1i_gg_",
|
|
40
|
+
"__SOverlay": "___SOverlay_umh1i_gg_",
|
|
41
|
+
"_background": "__background_umh1i_gg_",
|
|
42
|
+
"--background": "--background_cfhiws"
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
var SpinContainerRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PropGetterFn, ReturnEl, CProps } from '@semcore/core';
|
|
2
|
+
import { ISpinProps } from '@semcore/spin';
|
|
3
|
+
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
4
|
+
|
|
5
|
+
export interface ISpinContainerProps extends IBoxProps, ISpinProps {
|
|
6
|
+
/**
|
|
7
|
+
* Color of container spinner; you can use your own color
|
|
8
|
+
*/
|
|
9
|
+
background?: string;
|
|
10
|
+
/** Duration of animation displaying in ms
|
|
11
|
+
* @default 200
|
|
12
|
+
*/
|
|
13
|
+
duration?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Property responsible for displaying the spinner
|
|
16
|
+
* */
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ISpinContainerContext {
|
|
21
|
+
getOverlayProps: PropGetterFn;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ISpinContainerOverlayProps extends IBoxProps {
|
|
25
|
+
/**
|
|
26
|
+
* Css background; you can use your own color
|
|
27
|
+
*/
|
|
28
|
+
background?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const SpinContainer: (<T>(
|
|
32
|
+
props: CProps<ISpinContainerProps & T, ISpinContainerContext>,
|
|
33
|
+
) => ReturnEl) & {
|
|
34
|
+
Content: typeof Box;
|
|
35
|
+
Overlay: <T>(props: ISpinContainerOverlayProps & T) => ReturnEl;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default SpinContainer;
|
package/lib/es6/index.js
CHANGED
package/lib/es6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.js"],"names":["default"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB
|
|
1
|
+
{"version":3,"sources":["../../src/index.js"],"names":["default"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB","sourcesContent":["export { default } from './SpinContainer';\n"],"file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/spin-container",
|
|
3
3
|
"description": "SEMRush SpinContainer Component",
|
|
4
|
-
"version": "5.0
|
|
4
|
+
"version": "5.1.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"types": "lib/types/index.d.ts",
|
|
@@ -29,5 +29,8 @@
|
|
|
29
29
|
"type": "git",
|
|
30
30
|
"url": "https://github.com/semrush/intergalactic.git",
|
|
31
31
|
"directory": "semcore/spin-container"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@semcore/jest-preset-ui": "1.0.0"
|
|
32
35
|
}
|
|
33
36
|
}
|
package/src/index.js
CHANGED