@semcore/widget-empty 16.0.11-prerelease.5 → 17.0.0-prerelease.17
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 -1
- package/README.md +4 -4
- package/lib/cjs/Error/index.js +19 -30
- package/lib/cjs/Error/index.js.map +1 -1
- package/lib/cjs/Error/translations/__intergalactic-dynamic-locales.js +17 -17
- package/lib/cjs/Error/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/NoData/index.js +20 -31
- package/lib/cjs/NoData/index.js.map +1 -1
- package/lib/cjs/NoData/translations/__intergalactic-dynamic-locales.js +17 -17
- package/lib/cjs/NoData/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/WidgetEmpty.js +55 -58
- package/lib/cjs/WidgetEmpty.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +9 -9
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/widget-empty.shadow.css +1 -2
- package/lib/es6/Error/index.js +12 -23
- package/lib/es6/Error/index.js.map +1 -1
- package/lib/es6/Error/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/es6/Error/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/NoData/index.js +13 -24
- package/lib/es6/NoData/index.js.map +1 -1
- package/lib/es6/NoData/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/es6/NoData/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/WidgetEmpty.js +49 -53
- package/lib/es6/WidgetEmpty.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/style/widget-empty.shadow.css +1 -2
- package/lib/esm/Error/index.mjs +13 -21
- package/lib/esm/Error/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/NoData/index.mjs +14 -21
- package/lib/esm/NoData/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/WidgetEmpty.mjs +49 -50
- package/lib/esm/style/widget-empty.shadow.css +1 -2
- package/lib/types/index.d.ts +2 -8
- package/package.json +6 -6
package/lib/esm/WidgetEmpty.mjs
CHANGED
|
@@ -1,71 +1,70 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import { createComponent, sstyled,
|
|
2
|
+
import { createComponent, sstyled, Component, assignProps } from "@semcore/core";
|
|
3
|
+
import { Flex, Box } from "@semcore/base-components";
|
|
8
4
|
import isNode from "@semcore/core/lib/utils/isNode";
|
|
9
|
-
import { Flex, Box } from "@semcore/flex-box";
|
|
10
5
|
import { getIllustrationPath } from "@semcore/illustration";
|
|
11
6
|
import React from "react";
|
|
12
7
|
/*!__reshadow-styles__:"./style/widget-empty.shadow.css"*/
|
|
13
|
-
|
|
8
|
+
const style = (
|
|
14
9
|
/*__reshadow_css_start__*/
|
|
15
10
|
(sstyled.insert(
|
|
16
11
|
/*__inner_css_start__*/
|
|
17
|
-
".
|
|
12
|
+
".___SWidgetEmpty_8oyu7_gg_{flex-direction:column;justify-content:center;align-items:center}.___SImage_8oyu7_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_8oyu7_gg_,.___STitle_8oyu7_gg_{text-align:center;color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_8oyu7_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_8oyu7_gg_{text-wrap:balance;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_8oyu7_gg_+.___SDescription_8oyu7_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_8oyu7_gg_+.___SDescription_8oyu7_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}",
|
|
18
13
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
14
|
+
"8oyu7_gg_"
|
|
20
15
|
), /*__reshadow_css_end__*/
|
|
21
16
|
{
|
|
22
|
-
"__SWidgetEmpty": "
|
|
23
|
-
"__SImage": "
|
|
24
|
-
"__STitle": "
|
|
25
|
-
"__SDescription": "
|
|
17
|
+
"__SWidgetEmpty": "___SWidgetEmpty_8oyu7_gg_",
|
|
18
|
+
"__SImage": "___SImage_8oyu7_gg_",
|
|
19
|
+
"__STitle": "___STitle_8oyu7_gg_",
|
|
20
|
+
"__SDescription": "___SDescription_8oyu7_gg_"
|
|
26
21
|
})
|
|
27
22
|
);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var SWidgetEmpty = Flex;
|
|
42
|
-
var _this$asProps = this.asProps, Children = _this$asProps.Children, icon = _this$asProps.icon, styles = _this$asProps.styles;
|
|
43
|
-
var SImage = "div";
|
|
44
|
-
return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SWidgetEmpty, _ref4.cn("SWidgetEmpty", _objectSpread({}, assignProps({
|
|
23
|
+
const getIconPath = (name) => getIllustrationPath(name);
|
|
24
|
+
class WidgetEmpty extends Component {
|
|
25
|
+
render() {
|
|
26
|
+
var _ref = this.asProps, _ref4;
|
|
27
|
+
const SWidgetEmpty = Flex;
|
|
28
|
+
const {
|
|
29
|
+
Children,
|
|
30
|
+
icon,
|
|
31
|
+
styles
|
|
32
|
+
} = this.asProps;
|
|
33
|
+
const SImage = "div";
|
|
34
|
+
return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SWidgetEmpty, _ref4.cn("SWidgetEmpty", {
|
|
35
|
+
...assignProps({
|
|
45
36
|
"role": "status"
|
|
46
|
-
}, _ref)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
37
|
+
}, _ref)
|
|
38
|
+
}), isNode(icon) && /* @__PURE__ */ React.createElement(SImage, _ref4.cn("SImage", {
|
|
39
|
+
"aria-hidden": "true"
|
|
40
|
+
}), typeof icon === "string" ? /* @__PURE__ */ React.createElement("img", _ref4.cn("img", {
|
|
41
|
+
"src": icon,
|
|
42
|
+
"alt": ""
|
|
43
|
+
})) : icon), /* @__PURE__ */ React.createElement(Children, _ref4.cn("Children", {})));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
55
46
|
_defineProperty(WidgetEmpty, "displayName", "WidgetEmpty");
|
|
56
47
|
_defineProperty(WidgetEmpty, "style", style);
|
|
57
|
-
|
|
48
|
+
function Title(props) {
|
|
58
49
|
var _ref2 = arguments[0], _ref5;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
|
|
50
|
+
const STitle = Box;
|
|
51
|
+
const {
|
|
52
|
+
styles
|
|
53
|
+
} = props;
|
|
54
|
+
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(STitle, _ref5.cn("STitle", {
|
|
55
|
+
...assignProps({}, _ref2)
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
function Description(props) {
|
|
64
59
|
var _ref3 = arguments[0], _ref6;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
60
|
+
const SDescription = Box;
|
|
61
|
+
const {
|
|
62
|
+
styles
|
|
63
|
+
} = props;
|
|
64
|
+
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SDescription, _ref6.cn("SDescription", {
|
|
65
|
+
...assignProps({}, _ref3)
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
69
68
|
const WidgetEmpty$1 = createComponent(WidgetEmpty, {
|
|
70
69
|
Title,
|
|
71
70
|
Description
|
|
@@ -2,7 +2,6 @@ SWidgetEmpty {
|
|
|
2
2
|
flex-direction: column;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
5
|
-
margin-bottom: var(--intergalactic-spacing-4x, 16px);
|
|
6
5
|
}
|
|
7
6
|
|
|
8
7
|
SImage {
|
|
@@ -37,4 +36,4 @@ STitle+SDescription {
|
|
|
37
36
|
|
|
38
37
|
SDescription+SDescription {
|
|
39
38
|
margin-top: var(--intergalactic-spacing-2x, 8px);
|
|
40
|
-
}
|
|
39
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Box, FlexProps } from '@semcore/base-components';
|
|
2
|
+
import type { Intergalactic } from '@semcore/core';
|
|
2
3
|
import type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
3
|
-
import type { Box, FlexProps } from '@semcore/flex-box';
|
|
4
4
|
import type { TIllustrationNamesWidgetEmpty } from '@semcore/illustration';
|
|
5
5
|
|
|
6
6
|
export type iconNamesWidgetEmpty = TIllustrationNamesWidgetEmpty;
|
|
7
7
|
|
|
8
|
-
/** @deprecated */
|
|
9
|
-
export interface IWidgetEmptyProps extends WidgetEmptyProps, UnknownProperties {}
|
|
10
8
|
export type WidgetEmptyProps = FlexProps & {
|
|
11
9
|
/**
|
|
12
10
|
* URL before the icon or the whole component
|
|
@@ -14,16 +12,12 @@ export type WidgetEmptyProps = FlexProps & {
|
|
|
14
12
|
icon?: React.ReactNode;
|
|
15
13
|
};
|
|
16
14
|
|
|
17
|
-
/** @deprecated */
|
|
18
|
-
export interface IWidgetErrorProps extends WidgetErrorProps, UnknownProperties {}
|
|
19
15
|
export type WidgetErrorProps = WidgetEmptyProps &
|
|
20
16
|
WithI18nEnhanceProps & {
|
|
21
17
|
/** Error description. If it is absent, use the local default one */
|
|
22
18
|
description?: React.ReactNode;
|
|
23
19
|
};
|
|
24
20
|
|
|
25
|
-
/** @deprecated */
|
|
26
|
-
export interface IWidgetNoDataProps extends WidgetNoDataProps, UnknownProperties {}
|
|
27
21
|
export type WidgetNoDataProps = WidgetEmptyProps &
|
|
28
22
|
WithI18nEnhanceProps & {
|
|
29
23
|
/** Error description. If it is absent, use the local default one */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/widget-empty",
|
|
3
3
|
"description": "Semrush WidgetEmpty Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "17.0.0-prerelease.17",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,11 +14,10 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/
|
|
18
|
-
"@semcore/illustration": "16.0.12-prerelease.5"
|
|
17
|
+
"@semcore/illustration": "16.0.12"
|
|
19
18
|
},
|
|
20
19
|
"peerDependencies": {
|
|
21
|
-
"@semcore/base-components": "^
|
|
20
|
+
"@semcore/base-components": "^17.0.0-prerelease.17"
|
|
22
21
|
},
|
|
23
22
|
"repository": {
|
|
24
23
|
"type": "git",
|
|
@@ -26,8 +25,9 @@
|
|
|
26
25
|
"directory": "semcore/widget-empty"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
|
-
"@semcore/
|
|
30
|
-
"@semcore/
|
|
28
|
+
"@semcore/core": "17.0.0-prerelease.17",
|
|
29
|
+
"@semcore/base-components": "17.0.0-prerelease.17",
|
|
30
|
+
"@semcore/testing-utils": "1.0.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|