@semcore/widget-empty 3.2.0 → 3.2.1
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 +67 -0
- package/lib/cjs/Error/index.js.map +1 -1
- package/lib/cjs/NoData/index.js.map +1 -1
- package/lib/cjs/WidgetEmpty.js +7 -7
- package/lib/cjs/WidgetEmpty.js.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/es6/Error/index.js.map +1 -1
- package/lib/es6/NoData/index.js.map +1 -1
- package/lib/es6/WidgetEmpty.js +7 -7
- package/lib/es6/WidgetEmpty.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/package.json +2 -2
- package/src/Error/index.jsx +0 -40
- package/src/Error/translations/de.json +0 -4
- package/src/Error/translations/en.json +0 -4
- package/src/Error/translations/es.json +0 -4
- package/src/Error/translations/fr.json +0 -4
- package/src/Error/translations/it.json +0 -4
- package/src/Error/translations/ja.json +0 -4
- package/src/Error/translations/ko.json +0 -4
- package/src/Error/translations/pt.json +0 -4
- package/src/Error/translations/ru.json +0 -4
- package/src/Error/translations/vi.json +0 -4
- package/src/Error/translations/zh.json +0 -4
- package/src/NoData/index.jsx +0 -40
- package/src/NoData/translations/de.json +0 -4
- package/src/NoData/translations/en.json +0 -4
- package/src/NoData/translations/es.json +0 -4
- package/src/NoData/translations/fr.json +0 -4
- package/src/NoData/translations/it.json +0 -4
- package/src/NoData/translations/ja.json +0 -4
- package/src/NoData/translations/ko.json +0 -4
- package/src/NoData/translations/pt.json +0 -4
- package/src/NoData/translations/ru.json +0 -4
- package/src/NoData/translations/vi.json +0 -4
- package/src/NoData/translations/zh.json +0 -4
- package/src/WidgetEmpty.jsx +0 -57
- package/src/index.d.ts +0 -71
- package/src/index.js +0 -6
- package/src/style/widget-empty.shadow.css +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [3.2.1] - 2022-07-22
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [3.34.0 ~> 3.35.0], `@semcore/flex-box` [4.5.6 ~> 4.5.7]).
|
|
10
|
+
|
|
5
11
|
## [3.2.0] - 2022-06-30
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/README.md
CHANGED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @semcore/widget-empty
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/@semcore/widget-empty)
|
|
4
|
+
[](https://www.npmjs.com/package/@semcore/widget-empty)
|
|
5
|
+
[](https://github.com/semrush/intergalactic/blob/master/LICENSE)
|
|
6
|
+
|
|
7
|
+
> This component is part of the Intergalactic design system
|
|
8
|
+
|
|
9
|
+
### 📖 [Component documentation](https://developer.semrush.com/intergalactic/components/widget-empty/)
|
|
10
|
+
|
|
11
|
+
### 🏠 [Design system](https://developer.semrush.com/intergalactic/)
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install @semcore/ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
import WidgetEmpty, { NoData, Error } from '@semcore/ui/widget-empty';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<details>
|
|
26
|
+
<summary>Alternative installation and use</summary>
|
|
27
|
+
|
|
28
|
+
**We do not recommend this usage path due to possible dependency and update issues.**
|
|
29
|
+
|
|
30
|
+
### Install
|
|
31
|
+
|
|
32
|
+
You can only install one package from the design system
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npm install @semcore/widget-empty @semcore/core
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`@semcore/core` - _is the basic package by which we create our components, and it contains all of the common logic
|
|
39
|
+
of the components that is discussed below. There should only be one version of the package in the project._
|
|
40
|
+
|
|
41
|
+
### Usage
|
|
42
|
+
|
|
43
|
+
You can use the package the same way but without `/ui/` in the import path.
|
|
44
|
+
|
|
45
|
+
```jsx
|
|
46
|
+
import Accordion from '@semcore/widget-empty';
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
</details>
|
|
50
|
+
|
|
51
|
+
## 👤 Author
|
|
52
|
+
|
|
53
|
+
[UI-kit team](https://github.com/semrush/intergalactic/blob/master/MAINTAINERS) and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors)
|
|
54
|
+
|
|
55
|
+
## 🤝 Contributing
|
|
56
|
+
|
|
57
|
+
Contributions, issues and feature requests are welcome!
|
|
58
|
+
|
|
59
|
+
Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at the [contributing guide](https://github.com/semrush/intergalactic/blob/master/CONTRIBUTING.md).
|
|
60
|
+
|
|
61
|
+
## Show your support
|
|
62
|
+
|
|
63
|
+
Give a ⭐️ if this project helped you!
|
|
64
|
+
|
|
65
|
+
## 📝 License
|
|
66
|
+
|
|
67
|
+
This project is [MIT](https://github.com/semrush/intergalactic/blob/master/LICENSE) licensed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["i18n","de","en","es","fr","it","ja","ru","zh","pt","ko","vi","Error","asProps","Children","description","getI18nText","title","descriptionText","WidgetEmpty","getIconPath","Component","i18nEnhance","createComponent"],"sources":["../../../src/Error/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport de from './translations/de.json';\nimport en from './translations/en.json';\nimport es from './translations/es.json';\nimport fr from './translations/fr.json';\nimport it from './translations/it.json';\nimport ja from './translations/ja.json';\nimport pt from './translations/pt.json';\nimport ru from './translations/ru.json';\nimport zh from './translations/zh.json';\nimport ko from './translations/ko.json';\nimport vi from './translations/vi.json';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\n\nclass Error extends Component {\n static displayName = 'WidgetError';\n static defaultProps = {\n i18n,\n };\n static enhance = [i18nEnhance()];\n\n render() {\n const { Children, description, getI18nText } = this.asProps;\n const { title, description: descriptionText } = getI18nText();\n\n return (\n <Root render={WidgetEmpty} icon={getIconPath('warning')}>\n <WidgetEmpty.Title>{title}</WidgetEmpty.Title>\n <WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(Error);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAFA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG;EAAEC,EAAE,EAAFA,cAAF;EAAMC,EAAE,EAAFA,cAAN;EAAUC,EAAE,EAAFA,cAAV;EAAcC,EAAE,EAAFA,cAAd;EAAkBC,EAAE,EAAFA,cAAlB;EAAsBC,EAAE,EAAFA,cAAtB;EAA0BC,EAAE,EAAFA,cAA1B;EAA8BC,EAAE,EAAFA,cAA9B;EAAkCC,EAAE,EAAFA,cAAlC;EAAsCC,EAAE,EAAFA,cAAtC;EAA0CC,EAAE,EAAFA;AAA1C,CAAb;;IAEMC,K;;;;;;;;;;;;WAOJ,kBAAS;MAAA;MACP,oBAA+C,KAAKC,OAApD;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,WAAlB,iBAAkBA,WAAlB;MAAA,IAA+BC,WAA/B,iBAA+BA,WAA/B;;MACA,mBAAgDA,WAAW,EAA3D;MAAA,IAAQC,KAAR,gBAAQA,KAAR;MAAA,IAA4BC,eAA5B,gBAAeH,WAAf;;MAEA,oBACE,gCAAcI,uBAAd;QAAA,QAAiC,IAAAC,wBAAA,EAAY,SAAZ;MAAjC,uBACE,gCAAC,uBAAD,CAAa,KAAb,QAAoBH,KAApB,CADF,eAEE,gCAAC,uBAAD,CAAa,WAAb,QAA0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,gCAAC,QAAD,OAHF,CADF;IAOD;;;EAlBiBG,e;;iCAAdT,K,iBACiB,a;iCADjBA,K,kBAEkB;EACpBZ,IAAI,EAAJA;AADoB,C;iCAFlBY,K,aAKa,CAAC,IAAAU,uBAAA,GAAD,C;;eAgBJ,IAAAC,gBAAA,EAAgBX,KAAhB,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["i18n","de","en","es","fr","it","ja","ru","zh","pt","ko","vi","NoData","asProps","Children","type","description","getI18nText","title","descriptionText","WidgetEmpty","getIconPath","Component","i18nEnhance","createComponent"],"sources":["../../../src/NoData/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport de from './translations/de.json';\nimport en from './translations/en.json';\nimport es from './translations/es.json';\nimport fr from './translations/fr.json';\nimport it from './translations/it.json';\nimport ja from './translations/ja.json';\nimport pt from './translations/pt.json';\nimport ru from './translations/ru.json';\nimport zh from './translations/zh.json';\nimport ko from './translations/ko.json';\nimport vi from './translations/vi.json';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\n\nclass NoData extends Component {\n static displayName = 'WidgetNoData';\n static enhance = [i18nEnhance()];\n static defaultProps = {\n i18n,\n type: 'other-data',\n };\n\n render() {\n const { Children, type, description, getI18nText } = this.asProps;\n const { title, description: descriptionText } = getI18nText();\n return (\n <Root render={WidgetEmpty} icon={getIconPath(type)}>\n <WidgetEmpty.Title>{title}</WidgetEmpty.Title>\n <WidgetEmpty.Description>{description || descriptionText}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I,EAAE;AAFc,C;;eAkBT,IAAAS,gBAAA,EAAgBZ,MAAhB,C"}
|
package/lib/cjs/WidgetEmpty.js
CHANGED
|
@@ -46,17 +46,17 @@ var style = (
|
|
|
46
46
|
/*__reshadow_css_start__*/
|
|
47
47
|
_core.sstyled.insert(
|
|
48
48
|
/*__inner_css_start__*/
|
|
49
|
-
".
|
|
49
|
+
".___SWidgetEmpty_1x43k_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:16px}.___SImage_1x43k_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}.___STitle_1x43k_gg_{color:#6c6e79}.___STitle_1x43k_gg_{font-size:16px;line-height:1.5;font-weight:700}.___SDescription_1x43k_gg_{text-align:center;font-size:14px;line-height:1.42;color:#6c6e79;max-width:400px}.___STitle_1x43k_gg_+.___SDescription_1x43k_gg_{margin-top:4px}.___SDescription_1x43k_gg_+.___SDescription_1x43k_gg_{margin-top:8px}"
|
|
50
50
|
/*__inner_css_end__*/
|
|
51
|
-
, "
|
|
51
|
+
, "1x43k_gg_")
|
|
52
52
|
/*__reshadow_css_end__*/
|
|
53
53
|
, {
|
|
54
|
-
"__SWidgetEmpty": "
|
|
55
|
-
"__SImage": "
|
|
56
|
-
"__STitle": "
|
|
57
|
-
"__SDescription": "
|
|
54
|
+
"__SWidgetEmpty": "___SWidgetEmpty_1x43k_gg_",
|
|
55
|
+
"__SImage": "___SImage_1x43k_gg_",
|
|
56
|
+
"__STitle": "___STitle_1x43k_gg_",
|
|
57
|
+
"__SDescription": "___SDescription_1x43k_gg_"
|
|
58
58
|
});
|
|
59
|
-
var version = "3.2.
|
|
59
|
+
var version = "3.2.1";
|
|
60
60
|
|
|
61
61
|
var getIconPath = function getIconPath(name) {
|
|
62
62
|
return "https://static.semrush.com/ui-kit/widget-empty/".concat(version, "/").concat(name, ".svg");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"WidgetEmpty.js","names":["version","getIconPath","name","WidgetEmpty","SWidgetEmpty","Flex","asProps","Children","icon","styles","SImage","sstyled","isNode","Component","style","Title","props","STitle","Box","Description","SDescription","createComponent"],"sources":["../../src/WidgetEmpty.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box, Flex } from '@semcore/flex-box';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport style from './style/widget-empty.shadow.css';\n\nconst version = preval`\n module.exports = require('../package.json').version\n`;\n\nexport const getIconPath = (name) => {\n return `https://static.semrush.com/ui-kit/widget-empty/${version}/${name}.svg`;\n};\n\nclass WidgetEmpty extends Component {\n static displayName = 'WidgetEmpty';\n static style = style;\n\n render() {\n const SWidgetEmpty = Root;\n const { Children, icon, styles } = this.asProps;\n const SImage = 'div';\n\n return sstyled(styles)(\n <SWidgetEmpty render={Flex}>\n {isNode(icon) && (\n <SImage>\n {typeof icon === 'string' ? (\n <img src={icon} alt=\"widget empty icon\" width={100} height={72} />\n ) : (\n icon\n )}\n </SImage>\n )}\n <Children />\n </SWidgetEmpty>,\n );\n }\n}\n\nconst Title = (props) => {\n const STitle = Root;\n const { styles } = props;\n return sstyled(styles)(<STitle render={Box} />);\n};\n\nconst Description = (props) => {\n const SDescription = Root;\n const { styles } = props;\n return sstyled(styles)(<SDescription render={Box} />);\n};\n\nexport default createComponent(WidgetEmpty, {\n Title,\n Description,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,OAAO,UAAb;;AAIO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACC,IAAD,EAAU;EACnC,gEAAyDF,OAAzD,cAAoEE,IAApE;AACD,CAFM;;;;IAIDC,W;;;;;;;;;;;;WAIJ,kBAAS;MAAA;MAAA;;MACP,IAAMC,YAAY,GAKMC,aALxB;MACA,oBAAmC,KAAKC,OAAxC;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,IAAlB,iBAAkBA,IAAlB;MAAA,IAAwBC,MAAxB,iBAAwBA,MAAxB;MACA,IAAMC,MAAM,GAAG,KAAf;MAEA,eAAO,IAAAC,aAAA,EAAQF,MAAR,CAAP,eACE,gCAAC,YAAD,iFACG,IAAAG,kBAAA,EAAOJ,IAAP,kBACC,gCAAC,MAAD,0BACG,OAAOA,IAAP,KAAgB,QAAhB,gBACC;QAAA,OAAUA,IAAV;QAAA,OAAoB,mBAApB;QAAA,SAA+C,GAA/C;QAAA,UAA4D;MAA5D,GADD,GAGCA,IAJJ,CAFJ,eAUE,gCAAC,QAAD,2BAVF,CADF;IAcD;;;EAvBuBK,e;;iCAApBV,W,iBACiB,a;iCADjBA,W,WAEWW,K;;AAwBjB,IAAMC,KAAK,GAAG,SAARA,KAAQ,CAACC,KAAD,EAAW;EAAA;EAAA;;EACvB,IAAMC,MAAM,GAE2BC,YAFvC;EACA,IAAQT,MAAR,GAAmBO,KAAnB,CAAQP,MAAR;EACA,eAAO,IAAAE,aAAA,EAAQF,MAAR,CAAP,eAAuB,gCAAC,MAAD,2EAAvB;AACD,CAJD;;AAMA,IAAMU,WAAW,GAAG,SAAdA,WAAc,CAACH,KAAD,EAAW;EAAA;EAAA;;EAC7B,IAAMI,YAAY,GAE2BF,YAF7C;EACA,IAAQT,MAAR,GAAmBO,KAAnB,CAAQP,MAAR;EACA,eAAO,IAAAE,aAAA,EAAQF,MAAR,CAAP,eAAuB,gCAAC,YAAD,iFAAvB;AACD,CAJD;;eAMe,IAAAY,gBAAA,EAAgBlB,WAAhB,EAA6B;EAC1CY,KAAK,EAALA,KAD0C;EAE1CI,WAAW,EAAXA;AAF0C,CAA7B,C"}
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.js"],"sourcesContent":["export { default } from './WidgetEmpty';\nexport * from './WidgetEmpty';\n\nexport { default as NoData } from './NoData';\n\nexport { default as Error } from './Error';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","de","en","es","fr","it","ja","pt","ru","zh","ko","vi","i18n","Error","asProps","Children","description","getI18nText","title","descriptionText"],"sources":["../../../src/Error/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport de from './translations/de.json';\nimport en from './translations/en.json';\nimport es from './translations/es.json';\nimport fr from './translations/fr.json';\nimport it from './translations/it.json';\nimport ja from './translations/ja.json';\nimport pt from './translations/pt.json';\nimport ru from './translations/ru.json';\nimport zh from './translations/zh.json';\nimport ko from './translations/ko.json';\nimport vi from './translations/vi.json';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\n\nclass Error extends Component {\n static displayName = 'WidgetError';\n static defaultProps = {\n i18n,\n };\n static enhance = [i18nEnhance()];\n\n render() {\n const { Children, description, getI18nText } = this.asProps;\n const { title, description: descriptionText } = getI18nText();\n\n return (\n <Root render={WidgetEmpty} icon={getIconPath('warning')}>\n <WidgetEmpty.Title>{title}</WidgetEmpty.Title>\n <WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(Error);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,IAAsBC,WAAtB,QAAyC,gBAAzC;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAq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,CADF;IAOD;;;;EAlBiBrB,S;;gBAAde,K,iBACiB,a;;gBADjBA,K,kBAEkB;EACpBD,IAAI,EAAJA;AADoB,C;;gBAFlBC,K,aAKa,CAACb,WAAW,EAAZ,C;;AAgBnB,eAAeH,eAAe,CAACgB,KAAD,CAA9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","WidgetEmpty","getIconPath","createComponent","Component","Root","i18nEnhance","de","en","es","fr","it","ja","pt","ru","zh","ko","vi","i18n","NoData","asProps","Children","type","description","getI18nText","title","descriptionText"],"sources":["../../../src/NoData/index.jsx"],"sourcesContent":["import React from 'react';\nimport WidgetEmpty, { getIconPath } from '../WidgetEmpty';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport de from './translations/de.json';\nimport en from './translations/en.json';\nimport es from './translations/es.json';\nimport fr from './translations/fr.json';\nimport it from './translations/it.json';\nimport ja from './translations/ja.json';\nimport pt from './translations/pt.json';\nimport ru from './translations/ru.json';\nimport zh from './translations/zh.json';\nimport ko from './translations/ko.json';\nimport vi from './translations/vi.json';\n\nconst i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };\n\nclass NoData extends Component {\n static displayName = 'WidgetNoData';\n static enhance = [i18nEnhance()];\n static defaultProps = {\n i18n,\n type: 'other-data',\n };\n\n render() {\n const { Children, type, description, getI18nText } = this.asProps;\n const { title, description: descriptionText } = getI18nText();\n return (\n <Root render={WidgetEmpty} icon={getIconPath(type)}>\n <WidgetEmpty.Title>{title}</WidgetEmpty.Title>\n <WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>\n <Children />\n </Root>\n );\n }\n}\n\nexport default createComponent(NoData);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,IAAsBC,WAAtB,QAAyC,gBAAzC;AACA,OAAOC,eAA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A0BF,WAAW,IAAIG,eAAzC,CAFF,eAGE,oBAAC,QAAD,OAHF,CADF;IAOD;;;;EAlBkBtB,S;;gBAAfe,M,iBACiB,c;;gBADjBA,M,aAEa,CAACb,WAAW,EAAZ,C;;gBAFba,M,kBAGkB;EACpBD,IAAI,EAAJA,IADoB;EAEpBI,IAAI,EAAE;AAFc,C;;AAkBxB,eAAenB,eAAe,CAACgB,MAAD,CAA9B"}
|
package/lib/es6/WidgetEmpty.js
CHANGED
|
@@ -27,17 +27,17 @@ var style = (
|
|
|
27
27
|
/*__reshadow_css_start__*/
|
|
28
28
|
_sstyled.insert(
|
|
29
29
|
/*__inner_css_start__*/
|
|
30
|
-
".
|
|
30
|
+
".___SWidgetEmpty_1x43k_gg_{flex-direction:column;justify-content:center;align-items:center;margin-bottom:16px}.___SImage_1x43k_gg_{display:flex;align-items:flex-end;justify-content:center;margin-bottom:12px}.___STitle_1x43k_gg_{color:#6c6e79}.___STitle_1x43k_gg_{font-size:16px;line-height:1.5;font-weight:700}.___SDescription_1x43k_gg_{text-align:center;font-size:14px;line-height:1.42;color:#6c6e79;max-width:400px}.___STitle_1x43k_gg_+.___SDescription_1x43k_gg_{margin-top:4px}.___SDescription_1x43k_gg_+.___SDescription_1x43k_gg_{margin-top:8px}"
|
|
31
31
|
/*__inner_css_end__*/
|
|
32
|
-
, "
|
|
32
|
+
, "1x43k_gg_")
|
|
33
33
|
/*__reshadow_css_end__*/
|
|
34
34
|
, {
|
|
35
|
-
"__SWidgetEmpty": "
|
|
36
|
-
"__SImage": "
|
|
37
|
-
"__STitle": "
|
|
38
|
-
"__SDescription": "
|
|
35
|
+
"__SWidgetEmpty": "___SWidgetEmpty_1x43k_gg_",
|
|
36
|
+
"__SImage": "___SImage_1x43k_gg_",
|
|
37
|
+
"__STitle": "___STitle_1x43k_gg_",
|
|
38
|
+
"__SDescription": "___SDescription_1x43k_gg_"
|
|
39
39
|
});
|
|
40
|
-
var version = "3.2.
|
|
40
|
+
var version = "3.2.1";
|
|
41
41
|
export var getIconPath = function getIconPath(name) {
|
|
42
42
|
return "https://static.semrush.com/ui-kit/widget-empty/".concat(version, "/").concat(name, ".svg");
|
|
43
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"WidgetEmpty.js","names":["React","createComponent","Component","sstyled","Root","Box","Flex","isNode","version","getIconPath","name","WidgetEmpty","SWidgetEmpty","asProps","Children","icon","styles","SImage","style","Title","props","STitle","Description","SDescription"],"sources":["../../src/WidgetEmpty.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box, Flex } from '@semcore/flex-box';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport style from './style/widget-empty.shadow.css';\n\nconst version = preval`\n module.exports = require('../package.json').version\n`;\n\nexport const getIconPath = (name) => {\n return `https://static.semrush.com/ui-kit/widget-empty/${version}/${name}.svg`;\n};\n\nclass WidgetEmpty extends Component {\n static displayName = 'WidgetEmpty';\n static style = style;\n\n render() {\n const SWidgetEmpty = Root;\n const { Children, icon, styles } = this.asProps;\n const SImage = 'div';\n\n return sstyled(styles)(\n <SWidgetEmpty render={Flex}>\n {isNode(icon) && (\n <SImage>\n {typeof icon === 'string' ? (\n <img src={icon} alt=\"widget empty icon\" width={100} height={72} />\n ) : (\n icon\n )}\n </SImage>\n )}\n <Children />\n </SWidgetEmpty>,\n );\n }\n}\n\nconst Title = (props) => {\n const STitle = Root;\n const { styles } = props;\n return sstyled(styles)(<STitle render={Box} />);\n};\n\nconst Description = (props) => {\n const SDescription = Root;\n const { styles } = props;\n return sstyled(styles)(<SDescription render={Box} />);\n};\n\nexport default createComponent(WidgetEmpty, {\n Title,\n Description,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,OAArC,EAA8CC,IAA9C,QAA0D,eAA1D;AACA,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b,OAAO,CAACa,MAAD,CAAd,eAAuB,oBAAC,YAAD,wEAAvB;AACD,CAJD;;AAMA,eAAef,eAAe,CAACU,WAAD,EAAc;EAC1CQ,KAAK,EAALA,KAD0C;EAE1CG,WAAW,EAAXA;AAF0C,CAAd,CAA9B"}
|
package/lib/es6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","NoData","Error"],"sources":["../../src/index.js"],"sourcesContent":["export { default } from './WidgetEmpty';\nexport * from './WidgetEmpty';\n\nexport { default as NoData } from './NoData';\n\nexport { default as Error } from './Error';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB;AACA,cAAc,eAAd;AAEA,SAASA,OAAO,IAAIC,MAApB,QAAkC,UAAlC;AAEA,SAASD,OAAO,IAAIE,KAApB,QAAiC,SAAjC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/widget-empty",
|
|
3
3
|
"description": "SEMRush WidgetEmpty Component",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.1",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
|
-
"author": "
|
|
9
|
+
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "build --source=js",
|
package/src/Error/index.jsx
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import WidgetEmpty, { getIconPath } from '../WidgetEmpty';
|
|
3
|
-
import createComponent, { Component, Root } from '@semcore/core';
|
|
4
|
-
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
5
|
-
import de from './translations/de.json';
|
|
6
|
-
import en from './translations/en.json';
|
|
7
|
-
import es from './translations/es.json';
|
|
8
|
-
import fr from './translations/fr.json';
|
|
9
|
-
import it from './translations/it.json';
|
|
10
|
-
import ja from './translations/ja.json';
|
|
11
|
-
import pt from './translations/pt.json';
|
|
12
|
-
import ru from './translations/ru.json';
|
|
13
|
-
import zh from './translations/zh.json';
|
|
14
|
-
import ko from './translations/ko.json';
|
|
15
|
-
import vi from './translations/vi.json';
|
|
16
|
-
|
|
17
|
-
const i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };
|
|
18
|
-
|
|
19
|
-
class Error extends Component {
|
|
20
|
-
static displayName = 'WidgetError';
|
|
21
|
-
static defaultProps = {
|
|
22
|
-
i18n,
|
|
23
|
-
};
|
|
24
|
-
static enhance = [i18nEnhance()];
|
|
25
|
-
|
|
26
|
-
render() {
|
|
27
|
-
const { Children, description, getI18nText } = this.asProps;
|
|
28
|
-
const { title, description: descriptionText } = getI18nText();
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<Root render={WidgetEmpty} icon={getIconPath('warning')}>
|
|
32
|
-
<WidgetEmpty.Title>{title}</WidgetEmpty.Title>
|
|
33
|
-
<WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>
|
|
34
|
-
<Children />
|
|
35
|
-
</Root>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export default createComponent(Error);
|
package/src/NoData/index.jsx
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import WidgetEmpty, { getIconPath } from '../WidgetEmpty';
|
|
3
|
-
import createComponent, { Component, Root } from '@semcore/core';
|
|
4
|
-
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
5
|
-
import de from './translations/de.json';
|
|
6
|
-
import en from './translations/en.json';
|
|
7
|
-
import es from './translations/es.json';
|
|
8
|
-
import fr from './translations/fr.json';
|
|
9
|
-
import it from './translations/it.json';
|
|
10
|
-
import ja from './translations/ja.json';
|
|
11
|
-
import pt from './translations/pt.json';
|
|
12
|
-
import ru from './translations/ru.json';
|
|
13
|
-
import zh from './translations/zh.json';
|
|
14
|
-
import ko from './translations/ko.json';
|
|
15
|
-
import vi from './translations/vi.json';
|
|
16
|
-
|
|
17
|
-
const i18n = { de, en, es, fr, it, ja, ru, zh, pt, ko, vi };
|
|
18
|
-
|
|
19
|
-
class NoData extends Component {
|
|
20
|
-
static displayName = 'WidgetNoData';
|
|
21
|
-
static enhance = [i18nEnhance()];
|
|
22
|
-
static defaultProps = {
|
|
23
|
-
i18n,
|
|
24
|
-
type: 'other-data',
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
render() {
|
|
28
|
-
const { Children, type, description, getI18nText } = this.asProps;
|
|
29
|
-
const { title, description: descriptionText } = getI18nText();
|
|
30
|
-
return (
|
|
31
|
-
<Root render={WidgetEmpty} icon={getIconPath(type)}>
|
|
32
|
-
<WidgetEmpty.Title>{title}</WidgetEmpty.Title>
|
|
33
|
-
<WidgetEmpty.Description>{description || descriptionText}</WidgetEmpty.Description>
|
|
34
|
-
<Children />
|
|
35
|
-
</Root>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export default createComponent(NoData);
|
package/src/WidgetEmpty.jsx
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import createComponent, { Component, sstyled, Root } from '@semcore/core';
|
|
3
|
-
import { Box, Flex } from '@semcore/flex-box';
|
|
4
|
-
import isNode from '@semcore/utils/lib/isNode';
|
|
5
|
-
|
|
6
|
-
import style from './style/widget-empty.shadow.css';
|
|
7
|
-
|
|
8
|
-
const version = preval`
|
|
9
|
-
module.exports = require('../package.json').version
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
export const getIconPath = (name) => {
|
|
13
|
-
return `https://static.semrush.com/ui-kit/widget-empty/${version}/${name}.svg`;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
class WidgetEmpty extends Component {
|
|
17
|
-
static displayName = 'WidgetEmpty';
|
|
18
|
-
static style = style;
|
|
19
|
-
|
|
20
|
-
render() {
|
|
21
|
-
const SWidgetEmpty = Root;
|
|
22
|
-
const { Children, icon, styles } = this.asProps;
|
|
23
|
-
const SImage = 'div';
|
|
24
|
-
|
|
25
|
-
return sstyled(styles)(
|
|
26
|
-
<SWidgetEmpty render={Flex}>
|
|
27
|
-
{isNode(icon) && (
|
|
28
|
-
<SImage>
|
|
29
|
-
{typeof icon === 'string' ? (
|
|
30
|
-
<img src={icon} alt="widget empty icon" width={100} height={72} />
|
|
31
|
-
) : (
|
|
32
|
-
icon
|
|
33
|
-
)}
|
|
34
|
-
</SImage>
|
|
35
|
-
)}
|
|
36
|
-
<Children />
|
|
37
|
-
</SWidgetEmpty>,
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const Title = (props) => {
|
|
43
|
-
const STitle = Root;
|
|
44
|
-
const { styles } = props;
|
|
45
|
-
return sstyled(styles)(<STitle render={Box} />);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const Description = (props) => {
|
|
49
|
-
const SDescription = Root;
|
|
50
|
-
const { styles } = props;
|
|
51
|
-
return sstyled(styles)(<SDescription render={Box} />);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default createComponent(WidgetEmpty, {
|
|
55
|
-
Title,
|
|
56
|
-
Description,
|
|
57
|
-
});
|
package/src/index.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { CProps, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { Box, IFlexProps } from '@semcore/flex-box';
|
|
4
|
-
import { IWithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
5
|
-
|
|
6
|
-
export type iconNamesWidgetEmpty =
|
|
7
|
-
| 'area-chart'
|
|
8
|
-
| 'choropleth-map-chart'
|
|
9
|
-
| 'coffee'
|
|
10
|
-
| 'combined-chart'
|
|
11
|
-
| 'congrats'
|
|
12
|
-
| 'deleted-page'
|
|
13
|
-
| 'donut-chart'
|
|
14
|
-
| 'duplicates'
|
|
15
|
-
| 'funnel-chart'
|
|
16
|
-
| 'good'
|
|
17
|
-
| 'heat-map-chart'
|
|
18
|
-
| 'horizontal-bar-chart'
|
|
19
|
-
| 'kagi-chart'
|
|
20
|
-
| 'line-chart'
|
|
21
|
-
| 'lollipop-chart'
|
|
22
|
-
| 'nexttime'
|
|
23
|
-
| 'nothing-found'
|
|
24
|
-
| 'other-data'
|
|
25
|
-
| 'pie-chart'
|
|
26
|
-
| 'processing'
|
|
27
|
-
| 'radar-chart'
|
|
28
|
-
| 'radial-tree-chart'
|
|
29
|
-
| 'sankey-chart'
|
|
30
|
-
| 'scatter-plot-chart'
|
|
31
|
-
| 'stacked-area-chart'
|
|
32
|
-
| 'suggestion'
|
|
33
|
-
| 'suggestions'
|
|
34
|
-
| 'table'
|
|
35
|
-
| 'tag-cloud'
|
|
36
|
-
| 'text-links-etc'
|
|
37
|
-
| 'under-construction'
|
|
38
|
-
| 'venn-chart'
|
|
39
|
-
| 'vertical-bar-chart'
|
|
40
|
-
| 'warning';
|
|
41
|
-
|
|
42
|
-
export interface IWidgetEmptyProps extends IFlexProps {
|
|
43
|
-
/**
|
|
44
|
-
* URL before the icon or the whole component
|
|
45
|
-
*/
|
|
46
|
-
icon?: React.ReactNode;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface IWidgetErrorProps extends IWidgetEmptyProps, IWithI18nEnhanceProps {
|
|
50
|
-
/** Error description. If it is absent, use the local default one */
|
|
51
|
-
description?: React.ReactNode;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface IWidgetNoDataProps extends IWidgetEmptyProps, IWithI18nEnhanceProps {
|
|
55
|
-
/** Error description. If it is absent, use the local default one */
|
|
56
|
-
description?: React.ReactNode;
|
|
57
|
-
/* Data types */
|
|
58
|
-
type?: iconNamesWidgetEmpty;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
declare const WidgetEmpty: (<T>(props: CProps<IWidgetEmptyProps> & T) => ReturnEl) & {
|
|
62
|
-
Title: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
|
|
63
|
-
Description: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
declare const NoData: <T>(props: CProps<IWidgetNoDataProps> & T) => ReturnEl;
|
|
67
|
-
declare const Error: <T>(props: CProps<IWidgetErrorProps> & T) => ReturnEl;
|
|
68
|
-
declare const getIconPath: (name: string) => string;
|
|
69
|
-
|
|
70
|
-
export default WidgetEmpty;
|
|
71
|
-
export { getIconPath, NoData, Error };
|
package/src/index.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
|
|
3
|
-
SWidgetEmpty {
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
margin-bottom: 16px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
SImage {
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: flex-end;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
margin-bottom: 12px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
STitle {
|
|
18
|
-
color: var(--gray-500);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
STitle {
|
|
22
|
-
font-size: var(--fs-300);
|
|
23
|
-
line-height: var(--lh-300);
|
|
24
|
-
font-weight: bold;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
SDescription {
|
|
28
|
-
text-align: center;
|
|
29
|
-
font-size: var(--fs-200);
|
|
30
|
-
line-height: var(--lh-200);
|
|
31
|
-
color: var(--gray-500);
|
|
32
|
-
max-width: 400px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
STitle + SDescription {
|
|
36
|
-
margin-top: 4px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
SDescription + SDescription {
|
|
40
|
-
margin-top: 8px;
|
|
41
|
-
}
|