@semcore/widget-empty 16.0.11 → 17.0.0-prerelease.18

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +4 -4
  3. package/lib/cjs/Error/index.js +19 -30
  4. package/lib/cjs/Error/index.js.map +1 -1
  5. package/lib/cjs/Error/translations/__intergalactic-dynamic-locales.js +17 -17
  6. package/lib/cjs/Error/translations/__intergalactic-dynamic-locales.js.map +1 -1
  7. package/lib/cjs/NoData/index.js +20 -31
  8. package/lib/cjs/NoData/index.js.map +1 -1
  9. package/lib/cjs/NoData/translations/__intergalactic-dynamic-locales.js +17 -17
  10. package/lib/cjs/NoData/translations/__intergalactic-dynamic-locales.js.map +1 -1
  11. package/lib/cjs/WidgetEmpty.js +55 -58
  12. package/lib/cjs/WidgetEmpty.js.map +1 -1
  13. package/lib/cjs/index.d.js.map +1 -1
  14. package/lib/cjs/index.js +9 -9
  15. package/lib/cjs/index.js.map +1 -1
  16. package/lib/cjs/style/widget-empty.shadow.css +1 -2
  17. package/lib/es6/Error/index.js +12 -23
  18. package/lib/es6/Error/index.js.map +1 -1
  19. package/lib/es6/Error/translations/__intergalactic-dynamic-locales.js +16 -16
  20. package/lib/es6/Error/translations/__intergalactic-dynamic-locales.js.map +1 -1
  21. package/lib/es6/NoData/index.js +13 -24
  22. package/lib/es6/NoData/index.js.map +1 -1
  23. package/lib/es6/NoData/translations/__intergalactic-dynamic-locales.js +16 -16
  24. package/lib/es6/NoData/translations/__intergalactic-dynamic-locales.js.map +1 -1
  25. package/lib/es6/WidgetEmpty.js +49 -53
  26. package/lib/es6/WidgetEmpty.js.map +1 -1
  27. package/lib/es6/index.d.js.map +1 -1
  28. package/lib/es6/style/widget-empty.shadow.css +1 -2
  29. package/lib/esm/Error/index.mjs +13 -21
  30. package/lib/esm/Error/translations/__intergalactic-dynamic-locales.mjs +1 -1
  31. package/lib/esm/NoData/index.mjs +14 -21
  32. package/lib/esm/NoData/translations/__intergalactic-dynamic-locales.mjs +1 -1
  33. package/lib/esm/WidgetEmpty.mjs +49 -50
  34. package/lib/esm/style/widget-empty.shadow.css +1 -2
  35. package/lib/types/index.d.ts +2 -8
  36. package/package.json +4 -4
@@ -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, assignProps, Component } from "@semcore/core";
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
- var style = (
8
+ const style = (
14
9
  /*__reshadow_css_start__*/
15
10
  (sstyled.insert(
16
11
  /*__inner_css_start__*/
17
- ".___SWidgetEmpty_171y9_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:var(--intergalactic-spacing-4x, 16px)}.___SImage_171y9_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);width:80px;height:80px}.___SDescription_171y9_gg_,.___STitle_171y9_gg_{text-align:center;color:var(--intergalactic-text-secondary, #6c6e79)}.___STitle_171y9_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);font-weight:var(--intergalactic-bold, 700)}.___SDescription_171y9_gg_{text-wrap:balance;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);max-width:400px}.___STitle_171y9_gg_+.___SDescription_171y9_gg_{margin-top:var(--intergalactic-spacing-1x, 4px)}.___SDescription_171y9_gg_+.___SDescription_171y9_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}",
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
- "171y9_gg_"
14
+ "8oyu7_gg_"
20
15
  ), /*__reshadow_css_end__*/
21
16
  {
22
- "__SWidgetEmpty": "___SWidgetEmpty_171y9_gg_",
23
- "__SImage": "___SImage_171y9_gg_",
24
- "__STitle": "___STitle_171y9_gg_",
25
- "__SDescription": "___SDescription_171y9_gg_"
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
- var getIconPath = function getIconPath2(name) {
29
- return getIllustrationPath(name);
30
- };
31
- var WidgetEmpty = /* @__PURE__ */ (function(_Component) {
32
- function WidgetEmpty2() {
33
- _classCallCheck(this, WidgetEmpty2);
34
- return _callSuper(this, WidgetEmpty2, arguments);
35
- }
36
- _inherits(WidgetEmpty2, _Component);
37
- return _createClass(WidgetEmpty2, [{
38
- key: "render",
39
- value: function render() {
40
- var _ref = this.asProps, _ref4;
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))), isNode(icon) && /* @__PURE__ */ React.createElement(SImage, _ref4.cn("SImage", {
47
- "aria-hidden": "true"
48
- }), typeof icon === "string" ? /* @__PURE__ */ React.createElement("img", _ref4.cn("img", {
49
- "src": icon,
50
- "alt": ""
51
- })) : icon), /* @__PURE__ */ React.createElement(Children, _ref4.cn("Children", {})));
52
- }
53
- }]);
54
- })(Component);
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
- var Title = function Title2(props) {
48
+ function Title(props) {
58
49
  var _ref2 = arguments[0], _ref5;
59
- var STitle = Box;
60
- var styles = props.styles;
61
- return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(STitle, _ref5.cn("STitle", _objectSpread({}, assignProps({}, _ref2))));
62
- };
63
- var Description = function Description2(props) {
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
- var SDescription = Box;
66
- var styles = props.styles;
67
- return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SDescription, _ref6.cn("SDescription", _objectSpread({}, assignProps({}, _ref3))));
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
+ }
@@ -1,12 +1,10 @@
1
- import type { Intergalactic, UnknownProperties } from '@semcore/core';
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": "16.0.11",
4
+ "version": "17.0.0-prerelease.18",
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/flex-box": "16.0.11",
18
17
  "@semcore/illustration": "16.0.12"
19
18
  },
20
19
  "peerDependencies": {
21
- "@semcore/base-components": "^16.0.0"
20
+ "@semcore/base-components": "^17.0.0-prerelease.18"
22
21
  },
23
22
  "repository": {
24
23
  "type": "git",
@@ -26,8 +25,9 @@
26
25
  "directory": "semcore/widget-empty"
27
26
  },
28
27
  "devDependencies": {
28
+ "@semcore/core": "17.0.0-prerelease.18",
29
29
  "@semcore/testing-utils": "1.0.0",
30
- "@semcore/core": "16.5.1"
30
+ "@semcore/base-components": "17.0.0-prerelease.18"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "pnpm semcore-builder --source=js && pnpm vite build"