@semcore/notice 4.1.2 → 4.1.5

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 CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [4.1.5] - 2022-07-22
6
+
7
+ ### Changed
8
+
9
+ - Version patch update due to children dependencies update (`@semcore/animation` [1.5.4 ~> 1.5.5], `@semcore/utils` [3.34.0 ~> 3.35.0], `@semcore/flex-box` [4.5.6 ~> 4.5.7], `@semcore/icon` [2.29.0 ~> 2.29.1]).
10
+
11
+ ## [4.1.4] - 2022-07-21
12
+
13
+ ### Changed
14
+
15
+ - Version patch update due to children dependencies update (`@semcore/icon` [2.28.0 ~> 2.29.0]).
16
+
17
+ ## [4.1.3] - 2022-07-07
18
+
19
+ ### Changed
20
+
21
+ - Version patch update due to children dependencies update (`@semcore/animation` [1.5.3 ~> 1.5.4], `@semcore/utils` [3.33.0 ~> 3.34.0], `@semcore/flex-box` [4.5.5 ~> 4.5.6], `@semcore/icon` [2.27.0 ~> 2.28.0]).
22
+
5
23
  ## [4.1.2] - 2022-06-02
6
24
 
7
25
  ### Changed
package/README.md CHANGED
@@ -0,0 +1,67 @@
1
+ # @semcore/notice
2
+
3
+ [![version](https://img.shields.io/npm/v/@semcore/notice.svg)](https://www.npmjs.com/@semcore/notice)
4
+ [![downloads](https://img.shields.io/npm/dt/@semcore/notice.svg)](https://www.npmjs.com/package/@semcore/notice)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](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/notice/)
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 Notice, { NoticeSmart } from '@semcore/ui/notice';
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/notice @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 Notice, { NoticeSmart } from '@semcore/notice';
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.
package/lib/cjs/Notice.js CHANGED
@@ -54,23 +54,23 @@ var style = (
54
54
  /*__reshadow_css_start__*/
55
55
  _core.sstyled.insert(
56
56
  /*__inner_css_start__*/
57
- ".___SNotice_uwgyz_gg_{display:flex;padding:16px;font-size:14px;line-height:1.42;box-sizing:border-box;border-style:solid;border-width:1px;border-radius:6px}.___SNotice_uwgyz_gg_._theme_info_uwgyz_gg_{background-color:#e9f7ff;border-color:#8ecdff}.___SNotice_uwgyz_gg_._theme_info_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_{color:#008ff8}.___SNotice_uwgyz_gg_._theme_info_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_:hover{color:#006dca}.___SNotice_uwgyz_gg_._theme_danger_uwgyz_gg_{background-color:#fff0f7;border-color:#ffaeb5}.___SNotice_uwgyz_gg_._theme_danger_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_{color:#ff4953}.___SNotice_uwgyz_gg_._theme_danger_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_:hover{color:#d1002f}.___SNotice_uwgyz_gg_._theme_warning_uwgyz_gg_{background-color:#fff3d9;border-color:#ffb26e}.___SNotice_uwgyz_gg_._theme_warning_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_{color:#ff622d}.___SNotice_uwgyz_gg_._theme_warning_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_:hover{color:#c33909}.___SNotice_uwgyz_gg_._theme_success_uwgyz_gg_{background-color:#dbfee8;border-color:#59ddaa}.___SNotice_uwgyz_gg_._theme_success_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_{color:#009f81}.___SNotice_uwgyz_gg_._theme_success_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_:hover{color:#007c65}.___SContent_uwgyz_gg_{flex:1 1 auto;width:100%}.___SActions_uwgyz_gg_{flex-shrink:0;margin-top:12px}.___SLabel_uwgyz_gg_{margin-top:2px;margin-right:8px;display:inline-flex}.___SLabel_uwgyz_gg_._theme_info_uwgyz_gg_{color:#8a8e9b}.___SLabel_uwgyz_gg_._theme_danger_uwgyz_gg_{color:#ff4953}.___SLabel_uwgyz_gg_._theme_warning_uwgyz_gg_{color:#ff622d}.___SLabel_uwgyz_gg_._theme_success_uwgyz_gg_{color:#009f81}.___SLabel_uwgyz_gg_._theme_custom_uwgyz_gg_{color:var(--color_gatqwf)}.___SCloseIcon_uwgyz_gg_{flex-shrink:0;margin-left:16px}.___SNotice_uwgyz_gg_._theme_custom_uwgyz_gg_{background-color:var(--backgroundColor_gatqwf);border-color:var(--backgroundColor_gatqwf)}"
57
+ ".___SNotice_1ldal_gg_{display:flex;padding:16px;font-size:14px;line-height:1.42;box-sizing:border-box;border-style:solid;border-width:1px;border-radius:6px}.___SNotice_1ldal_gg_._theme_info_1ldal_gg_{background-color:#e9f7ff;border-color:#8ecdff}.___SNotice_1ldal_gg_._theme_info_1ldal_gg_ .___SCloseIcon_1ldal_gg_{color:#008ff8}.___SNotice_1ldal_gg_._theme_info_1ldal_gg_ .___SCloseIcon_1ldal_gg_:hover{color:#006dca}.___SNotice_1ldal_gg_._theme_danger_1ldal_gg_{background-color:#fff0f7;border-color:#ffaeb5}.___SNotice_1ldal_gg_._theme_danger_1ldal_gg_ .___SCloseIcon_1ldal_gg_{color:#ff4953}.___SNotice_1ldal_gg_._theme_danger_1ldal_gg_ .___SCloseIcon_1ldal_gg_:hover{color:#d1002f}.___SNotice_1ldal_gg_._theme_warning_1ldal_gg_{background-color:#fff3d9;border-color:#ffb26e}.___SNotice_1ldal_gg_._theme_warning_1ldal_gg_ .___SCloseIcon_1ldal_gg_{color:#ff642d}.___SNotice_1ldal_gg_._theme_warning_1ldal_gg_ .___SCloseIcon_1ldal_gg_:hover{color:#c33909}.___SNotice_1ldal_gg_._theme_success_1ldal_gg_{background-color:#dbfee8;border-color:#59ddaa}.___SNotice_1ldal_gg_._theme_success_1ldal_gg_ .___SCloseIcon_1ldal_gg_{color:#009f81}.___SNotice_1ldal_gg_._theme_success_1ldal_gg_ .___SCloseIcon_1ldal_gg_:hover{color:#007c65}.___SContent_1ldal_gg_{flex:1 1 auto;width:100%}.___SActions_1ldal_gg_{flex-shrink:0;margin-top:12px}.___SLabel_1ldal_gg_{margin-top:2px;margin-right:8px;display:inline-flex}.___SLabel_1ldal_gg_._theme_info_1ldal_gg_{color:#8a8e9b}.___SLabel_1ldal_gg_._theme_danger_1ldal_gg_{color:#ff4953}.___SLabel_1ldal_gg_._theme_warning_1ldal_gg_{color:#ff642d}.___SLabel_1ldal_gg_._theme_success_1ldal_gg_{color:#009f81}.___SLabel_1ldal_gg_._theme_custom_1ldal_gg_{color:var(--color_1ldal)}.___SCloseIcon_1ldal_gg_{flex-shrink:0;margin-left:16px}.___SNotice_1ldal_gg_._theme_custom_1ldal_gg_{background-color:var(--backgroundColor_1ldal);border-color:var(--backgroundColor_1ldal)}"
58
58
  /*__inner_css_end__*/
59
- , "gatqwf_gg_")
59
+ , "1ldal_gg_")
60
60
  /*__reshadow_css_end__*/
61
61
  , {
62
- "__SNotice": "___SNotice_uwgyz_gg_",
63
- "_theme_info": "_theme_info_uwgyz_gg_",
64
- "__SCloseIcon": "___SCloseIcon_uwgyz_gg_",
65
- "_theme_danger": "_theme_danger_uwgyz_gg_",
66
- "_theme_warning": "_theme_warning_uwgyz_gg_",
67
- "_theme_success": "_theme_success_uwgyz_gg_",
68
- "__SContent": "___SContent_uwgyz_gg_",
69
- "__SActions": "___SActions_uwgyz_gg_",
70
- "__SLabel": "___SLabel_uwgyz_gg_",
71
- "_theme_custom": "_theme_custom_uwgyz_gg_",
72
- "--color": "--color_gatqwf",
73
- "--backgroundColor": "--backgroundColor_gatqwf"
62
+ "__SNotice": "___SNotice_1ldal_gg_",
63
+ "_theme_info": "_theme_info_1ldal_gg_",
64
+ "__SCloseIcon": "___SCloseIcon_1ldal_gg_",
65
+ "_theme_danger": "_theme_danger_1ldal_gg_",
66
+ "_theme_warning": "_theme_warning_1ldal_gg_",
67
+ "_theme_success": "_theme_success_1ldal_gg_",
68
+ "__SContent": "___SContent_1ldal_gg_",
69
+ "__SActions": "___SActions_1ldal_gg_",
70
+ "__SLabel": "___SLabel_1ldal_gg_",
71
+ "_theme_custom": "_theme_custom_1ldal_gg_",
72
+ "--color": "--color_1ldal",
73
+ "--backgroundColor": "--backgroundColor_1ldal"
74
74
  });
75
75
 
76
76
  function isCustomTheme(theme) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Notice.jsx"],"names":["isCustomTheme","theme","includes","RootNotice","asProps","SNotice","FadeInOut","Children","styles","hidden","use","color","useTheme","logger","warn","displayName","Component","style","duration","Label","SLabel","Box","Actions","SActions","Content","SContent","CloseIcon","SCloseIcon","Close"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;AAC5B,SAAO,CAAC,CAAC,QAAD,EAAW,SAAX,EAAsB,SAAtB,EAAiC,MAAjC,EAAyCC,QAAzC,CAAkDD,KAAlD,CAAR;AACD;;IAEKE,U;;;;;;;;;;;;WAQJ,yBAAgB;AACd,UAAQF,KAAR,GAAkB,KAAKG,OAAvB,CAAQH,KAAR;AACA,aAAO;AACLA,QAAAA,KAAK,EAALA;AADK,OAAP;AAGD;;;WAED,kBAAS;AAAA;AAAA;;AACP,UAAMI,OAAO,GAgBDC,oBAhBZ;AACA,0BAAiD,KAAKF,OAAtD;AAAA,UAAQG,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,MAAlB,iBAAkBA,MAAlB;AAAA,UAA0BC,MAA1B,iBAA0BA,MAA1B;AAAA,UAAkCR,KAAlC,iBAAkCA,KAAlC;AAAA,UAAyCS,GAAzC,iBAAyCA,GAAzC;AACA,UAAMC,KAAK,GAAG,uBAAaV,KAAb,CAAd;AACA,UAAMW,QAAQ,GAAGZ,aAAa,CAACC,KAAD,CAAb,GAAuB,QAAvB,GAAkCA,KAAnD;;AAEA,UAAIS,GAAG,KAAK,SAAZ,EAAuB;AACrBG,2BAAOC,IAAP,CACE,IADF,wEAGEX,UAAU,CAACY,WAHb;;AAKA,4BAAO,gCAAC,wBAAD,EAAkB,KAAKX,OAAvB,CAAP;AACD;;AAED,qBAAO,mBAAQI,MAAR,CAAP,eACE,gCAAC,OAAD;AAAA,mBAEW,CAACC,MAFZ;AAAA,qBAGaG,QAHb;AAAA,2BAImBD,KAJnB;AAAA,gBAKO;AALP,+BAOE,gCAAC,QAAD,2BAPF,CADF;AAW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PA,OAHyC;AAIzCE,EAAAA,SAAS,EAATA;AAJyC,CAA5B,C","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport Close from '@semcore/icon/Close/m';\nimport resolveColor from '@semcore/utils/lib/color';\nimport { FadeInOut } from '@semcore/animation';\nimport logger from '@semcore/utils/lib/logger';\nimport NoticeGlobal from '@semcore/notice-global';\n\nimport style from './style/notice.shadow.css';\n\nfunction isCustomTheme(theme) {\n return !['danger', 'warning', 'success', 'info'].includes(theme);\n}\n\nclass RootNotice extends Component {\n static displayName = 'Notice';\n static style = style;\n static defaultProps = {\n theme: 'info',\n duration: 250,\n };\n\n getLabelProps() {\n const { theme } = this.asProps;\n return {\n theme,\n };\n }\n\n render() {\n const SNotice = Root;\n const { Children, styles, hidden, theme, use } = this.asProps;\n const color = resolveColor(theme);\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n\n if (use === 'primary') {\n logger.warn(\n true,\n `This deprecated property, you should use component <NoticeGlobal/>`,\n RootNotice.displayName,\n );\n return <NoticeGlobal {...this.asProps} />;\n }\n\n return sstyled(styles)(\n <SNotice\n render={FadeInOut}\n visible={!hidden}\n use:theme={useTheme}\n backgroundColor={color}\n role=\"alert\"\n >\n <Children />\n </SNotice>,\n );\n }\n}\n\nfunction Label({ styles, theme }) {\n const SLabel = Root;\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n const color = resolveColor(theme);\n return sstyled(styles)(<SLabel render={Box} use:theme={useTheme} color={color} />);\n}\n\nfunction Actions({ styles }) {\n const SActions = Root;\n return sstyled(styles)(<SActions render={Box} />);\n}\n\nfunction Content({ styles }) {\n const SContent = Root;\n return sstyled(styles)(<SContent render={Box} />);\n}\n\nfunction CloseIcon({ styles }) {\n const SCloseIcon = Root;\n return sstyled(styles)(\n <SCloseIcon render={Box} tag={Close} interactive aria-label=\"Close alert\" />,\n );\n}\n\nexport default createComponent(RootNotice, {\n Label,\n Actions,\n Content,\n CloseIcon,\n});\n"],"file":"Notice.js"}
1
+ {"version":3,"file":"Notice.js","names":["isCustomTheme","theme","includes","RootNotice","asProps","SNotice","FadeInOut","Children","styles","hidden","use","color","resolveColor","useTheme","logger","warn","displayName","sstyled","Component","style","duration","Label","SLabel","Box","Actions","SActions","Content","SContent","CloseIcon","SCloseIcon","Close","createComponent"],"sources":["../../src/Notice.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport Close from '@semcore/icon/Close/m';\nimport resolveColor from '@semcore/utils/lib/color';\nimport { FadeInOut } from '@semcore/animation';\nimport logger from '@semcore/utils/lib/logger';\nimport NoticeGlobal from '@semcore/notice-global';\n\nimport style from './style/notice.shadow.css';\n\nfunction isCustomTheme(theme) {\n return !['danger', 'warning', 'success', 'info'].includes(theme);\n}\n\nclass RootNotice extends Component {\n static displayName = 'Notice';\n static style = style;\n static defaultProps = {\n theme: 'info',\n duration: 250,\n };\n\n getLabelProps() {\n const { theme } = this.asProps;\n return {\n theme,\n };\n }\n\n render() {\n const SNotice = Root;\n const { Children, styles, hidden, theme, use } = this.asProps;\n const color = resolveColor(theme);\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n\n if (use === 'primary') {\n logger.warn(\n true,\n `This deprecated property, you should use component <NoticeGlobal/>`,\n RootNotice.displayName,\n );\n return <NoticeGlobal {...this.asProps} />;\n }\n\n return sstyled(styles)(\n <SNotice\n render={FadeInOut}\n visible={!hidden}\n use:theme={useTheme}\n backgroundColor={color}\n role=\"alert\"\n >\n <Children />\n </SNotice>,\n );\n }\n}\n\nfunction Label({ styles, theme }) {\n const SLabel = Root;\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n const color = resolveColor(theme);\n return sstyled(styles)(<SLabel render={Box} use:theme={useTheme} color={color} />);\n}\n\nfunction Actions({ styles }) {\n const SActions = Root;\n return sstyled(styles)(<SActions render={Box} />);\n}\n\nfunction Content({ styles }) {\n const SContent = Root;\n return sstyled(styles)(<SContent render={Box} />);\n}\n\nfunction CloseIcon({ styles }) {\n const SCloseIcon = Root;\n return sstyled(styles)(\n <SCloseIcon render={Box} tag={Close} interactive aria-label=\"Close alert\" />,\n );\n}\n\nexport default createComponent(RootNotice, {\n Label,\n Actions,\n Content,\n CloseIcon,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;EAC5B,OAAO,CAAC,CAAC,QAAD,EAAW,SAAX,EAAsB,SAAtB,EAAiC,MAAjC,EAAyCC,QAAzC,CAAkDD,KAAlD,CAAR;AACD;;IAEKE,U;;;;;;;;;;;;WAQJ,yBAAgB;MACd,IAAQF,KAAR,GAAkB,KAAKG,OAAvB,CAAQH,KAAR;MACA,OAAO;QACLA,KAAK,EAALA;MADK,CAAP;IAGD;;;WAED,kBAAS;MAAA;MAAA;;MACP,IAAMI,OAAO,GAgBDC,oBAhBZ;MACA,oBAAiD,KAAKF,OAAtD;MAAA,IAAQG,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,MAAlB,iBAAkBA,MAAlB;MAAA,IAA0BC,MAA1B,iBAA0BA,MAA1B;MAAA,IAAkCR,KAAlC,iBAAkCA,KAAlC;MAAA,IAAyCS,GAAzC,iBAAyCA,GAAzC;MACA,IAAMC,KAAK,GAAG,IAAAC,iBAAA,EAAaX,KAAb,CAAd;MACA,IAAMY,QAAQ,GAAGb,aAAa,CAACC,KAAD,CAAb,GAAuB,QAAvB,GAAkCA,KAAnD;;MAEA,IAAIS,GAAG,KAAK,SAAZ,EAAuB;QACrBI,kBAAA,CAAOC,IAAP,CACE,IADF,wEAGEZ,UAAU,CAACa,WAHb;;QAKA,oBAAO,gCAAC,wBAAD,EAAkB,KAAKZ,OAAvB,CAAP;MACD;;M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EAAQT,MAAR,CAAP,eACE,gCAAC,UAAD;IAAA,OAA8BsB,aAA9B;IAAA;IAAA,cAA4D;EAA5D,YADF;AAGD;;eAEc,IAAAC,gBAAA,EAAgB5B,UAAhB,EAA4B;EACzCkB,KAAK,EAALA,KADyC;EAEzCG,OAAO,EAAPA,OAFyC;EAGzCE,OAAO,EAAPA,OAHyC;EAIzCE,SAAS,EAATA;AAJyC,CAA5B,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/NoticeSmart.jsx"],"names":["NoticeSmart","SNoticeSmart","Notice","asProps","Children","label","actions","closable","onClose","Component","theme"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;;;;;;;;;IAEMA,W;;;;;;;;;;;;WAOJ,kBAAS;AAAA;AACP,UAAMC,YAAY,GAGMC,kBAHxB;AACA,0BAAwD,KAAKC,OAA7D;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,KAAlB,iBAAkBA,KAAlB;AAAA,UAAyBC,OAAzB,iBAAyBA,OAAzB;AAAA,UAAkCC,QAAlC,iBAAkCA,QAAlC;AAAA,UAA4CC,OAA5C,iBAA4CA,OAA5C;AACA,0BACE,gCAAC,YAAD,oCACG,wBAAOH,KAAP,kBAAiB,gCAAC,kBAAD,CAAQ,KAAR,QAAeA,KAAf,CADpB,eAEE,gCAAC,kBAAD,CAAQ,OAAR,qBACE,gCAAC,QAAD,OADF,EAEG,wBAAOC,OAAP,kBAAmB,gCAAC,kBAAD,CAAQ,OAAR,QAAiBA,OAAjB,CAFtB,CAFF,EAMGC,QAAQ,iBAAI,gCAAC,kBAAD,CAAQ,SAAR;AAAkB,QAAA,OAAO,EAAEC;AAA3B,QANf,CADF;AAUD;;;EApBuBC,e;;iCAApBT,W,iBACiB,a;iCADjBA,W,kBAGkB;AACpBU,EAAAA,KAAK,EAAE;AADa,C;;eAoBT,sBAAgBV,WAAhB,C","sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\nimport Notice from './Notice';\n\nclass NoticeSmart extends Component {\n static displayName = 'NoticeSmart';\n\n static defaultProps = {\n theme: 'info',\n };\n\n render() {\n const SNoticeSmart = Root;\n const { Children, label, actions, closable, onClose } = this.asProps;\n return (\n <SNoticeSmart render={Notice}>\n {isNode(label) && <Notice.Label>{label}</Notice.Label>}\n <Notice.Content>\n <Children />\n {isNode(actions) && <Notice.Actions>{actions}</Notice.Actions>}\n </Notice.Content>\n {closable && <Notice.CloseIcon onClick={onClose} />}\n </SNoticeSmart>\n );\n }\n}\n\nexport default createComponent(NoticeSmart);\n"],"file":"NoticeSmart.js"}
1
+ {"version":3,"file":"NoticeSmart.js","names":["NoticeSmart","SNoticeSmart","Notice","asProps","Children","label","actions","closable","onClose","isNode","Component","theme","createComponent"],"sources":["../../src/NoticeSmart.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\nimport Notice from './Notice';\n\nclass NoticeSmart extends Component {\n static displayName = 'NoticeSmart';\n\n static defaultProps = {\n theme: 'info',\n };\n\n render() {\n const SNoticeSmart = Root;\n const { Children, label, actions, closable, onClose } = this.asProps;\n return (\n <SNoticeSmart render={Notice}>\n {isNode(label) && <Notice.Label>{label}</Notice.Label>}\n <Notice.Content>\n <Children />\n {isNode(actions) && <Notice.Actions>{actions}</Notice.Actions>}\n </Notice.Content>\n {closable && <Notice.CloseIcon onClick={onClose} />}\n </SNoticeSmart>\n );\n }\n}\n\nexport default createComponent(NoticeSmart);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;;;;;;;;;IAEMA,W;;;;;;;;;;;;WAOJ,kBAAS;MAAA;MACP,IAAMC,YAAY,GAGMC,kBAHxB;MACA,oBAAwD,KAAKC,OAA7D;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,KAAlB,iBAAkBA,KAAlB;MAAA,IAAyBC,OAAzB,iBAAyBA,OAAzB;MAAA,IAAkCC,QAAlC,iBAAkCA,QAAlC;MAAA,IAA4CC,OAA5C,iBAA4CA,OAA5C;MACA,oBACE,gCAAC,YAAD,oCACG,IAAAC,kBAAA,EAAOJ,KAAP,kBAAiB,gCAAC,kBAAD,CAAQ,KAAR,QAAeA,KAAf,CADpB,eAEE,gCAAC,kBAAD,CAAQ,OAAR,qBACE,gCAAC,QAAD,OADF,EAEG,IAAAI,kBAAA,EAAOH,OAAP,kBAAmB,gCAAC,kBAAD,CAAQ,OAAR,QAAiBA,OAAjB,CAFtB,CAFF,EAMGC,QAAQ,iBAAI,gCAAC,kBAAD,CAAQ,SAAR;QAAkB,OAAO,EAAEC;MAA3B,EANf,CADF;IAUD;;;EApBuBE,e;;iCAApBV,W,iBACiB,a;iCADjBA,W,kBAGkB;EACpBW,KAAK,EAAE;AADa,C;;eAoBT,IAAAC,gBAAA,EAAgBZ,WAAhB,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.js"],"names":["Notice"],"mappings":";;;;;;;;;;;;;;;AAAA;;AAGA;;eADeA,kB","sourcesContent":["import { default as Notice } from './Notice';\n\nexport default Notice;\nexport { default as NoticeSmart } from './NoticeSmart';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["Notice"],"sources":["../../src/index.js"],"sourcesContent":["import { default as Notice } from './Notice';\n\nexport default Notice;\nexport { default as NoticeSmart } from './NoticeSmart';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AAGA;;eADeA,kB"}
package/lib/es6/Notice.js CHANGED
@@ -33,23 +33,23 @@ var style = (
33
33
  /*__reshadow_css_start__*/
34
34
  _sstyled.insert(
35
35
  /*__inner_css_start__*/
36
- ".___SNotice_uwgyz_gg_{display:flex;padding:16px;font-size:14px;line-height:1.42;box-sizing:border-box;border-style:solid;border-width:1px;border-radius:6px}.___SNotice_uwgyz_gg_._theme_info_uwgyz_gg_{background-color:#e9f7ff;border-color:#8ecdff}.___SNotice_uwgyz_gg_._theme_info_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_{color:#008ff8}.___SNotice_uwgyz_gg_._theme_info_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_:hover{color:#006dca}.___SNotice_uwgyz_gg_._theme_danger_uwgyz_gg_{background-color:#fff0f7;border-color:#ffaeb5}.___SNotice_uwgyz_gg_._theme_danger_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_{color:#ff4953}.___SNotice_uwgyz_gg_._theme_danger_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_:hover{color:#d1002f}.___SNotice_uwgyz_gg_._theme_warning_uwgyz_gg_{background-color:#fff3d9;border-color:#ffb26e}.___SNotice_uwgyz_gg_._theme_warning_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_{color:#ff622d}.___SNotice_uwgyz_gg_._theme_warning_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_:hover{color:#c33909}.___SNotice_uwgyz_gg_._theme_success_uwgyz_gg_{background-color:#dbfee8;border-color:#59ddaa}.___SNotice_uwgyz_gg_._theme_success_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_{color:#009f81}.___SNotice_uwgyz_gg_._theme_success_uwgyz_gg_ .___SCloseIcon_uwgyz_gg_:hover{color:#007c65}.___SContent_uwgyz_gg_{flex:1 1 auto;width:100%}.___SActions_uwgyz_gg_{flex-shrink:0;margin-top:12px}.___SLabel_uwgyz_gg_{margin-top:2px;margin-right:8px;display:inline-flex}.___SLabel_uwgyz_gg_._theme_info_uwgyz_gg_{color:#8a8e9b}.___SLabel_uwgyz_gg_._theme_danger_uwgyz_gg_{color:#ff4953}.___SLabel_uwgyz_gg_._theme_warning_uwgyz_gg_{color:#ff622d}.___SLabel_uwgyz_gg_._theme_success_uwgyz_gg_{color:#009f81}.___SLabel_uwgyz_gg_._theme_custom_uwgyz_gg_{color:var(--color_gatqwf)}.___SCloseIcon_uwgyz_gg_{flex-shrink:0;margin-left:16px}.___SNotice_uwgyz_gg_._theme_custom_uwgyz_gg_{background-color:var(--backgroundColor_gatqwf);border-color:var(--backgroundColor_gatqwf)}"
36
+ ".___SNotice_1ldal_gg_{display:flex;padding:16px;font-size:14px;line-height:1.42;box-sizing:border-box;border-style:solid;border-width:1px;border-radius:6px}.___SNotice_1ldal_gg_._theme_info_1ldal_gg_{background-color:#e9f7ff;border-color:#8ecdff}.___SNotice_1ldal_gg_._theme_info_1ldal_gg_ .___SCloseIcon_1ldal_gg_{color:#008ff8}.___SNotice_1ldal_gg_._theme_info_1ldal_gg_ .___SCloseIcon_1ldal_gg_:hover{color:#006dca}.___SNotice_1ldal_gg_._theme_danger_1ldal_gg_{background-color:#fff0f7;border-color:#ffaeb5}.___SNotice_1ldal_gg_._theme_danger_1ldal_gg_ .___SCloseIcon_1ldal_gg_{color:#ff4953}.___SNotice_1ldal_gg_._theme_danger_1ldal_gg_ .___SCloseIcon_1ldal_gg_:hover{color:#d1002f}.___SNotice_1ldal_gg_._theme_warning_1ldal_gg_{background-color:#fff3d9;border-color:#ffb26e}.___SNotice_1ldal_gg_._theme_warning_1ldal_gg_ .___SCloseIcon_1ldal_gg_{color:#ff642d}.___SNotice_1ldal_gg_._theme_warning_1ldal_gg_ .___SCloseIcon_1ldal_gg_:hover{color:#c33909}.___SNotice_1ldal_gg_._theme_success_1ldal_gg_{background-color:#dbfee8;border-color:#59ddaa}.___SNotice_1ldal_gg_._theme_success_1ldal_gg_ .___SCloseIcon_1ldal_gg_{color:#009f81}.___SNotice_1ldal_gg_._theme_success_1ldal_gg_ .___SCloseIcon_1ldal_gg_:hover{color:#007c65}.___SContent_1ldal_gg_{flex:1 1 auto;width:100%}.___SActions_1ldal_gg_{flex-shrink:0;margin-top:12px}.___SLabel_1ldal_gg_{margin-top:2px;margin-right:8px;display:inline-flex}.___SLabel_1ldal_gg_._theme_info_1ldal_gg_{color:#8a8e9b}.___SLabel_1ldal_gg_._theme_danger_1ldal_gg_{color:#ff4953}.___SLabel_1ldal_gg_._theme_warning_1ldal_gg_{color:#ff642d}.___SLabel_1ldal_gg_._theme_success_1ldal_gg_{color:#009f81}.___SLabel_1ldal_gg_._theme_custom_1ldal_gg_{color:var(--color_1ldal)}.___SCloseIcon_1ldal_gg_{flex-shrink:0;margin-left:16px}.___SNotice_1ldal_gg_._theme_custom_1ldal_gg_{background-color:var(--backgroundColor_1ldal);border-color:var(--backgroundColor_1ldal)}"
37
37
  /*__inner_css_end__*/
38
- , "gatqwf_gg_")
38
+ , "1ldal_gg_")
39
39
  /*__reshadow_css_end__*/
40
40
  , {
41
- "__SNotice": "___SNotice_uwgyz_gg_",
42
- "_theme_info": "_theme_info_uwgyz_gg_",
43
- "__SCloseIcon": "___SCloseIcon_uwgyz_gg_",
44
- "_theme_danger": "_theme_danger_uwgyz_gg_",
45
- "_theme_warning": "_theme_warning_uwgyz_gg_",
46
- "_theme_success": "_theme_success_uwgyz_gg_",
47
- "__SContent": "___SContent_uwgyz_gg_",
48
- "__SActions": "___SActions_uwgyz_gg_",
49
- "__SLabel": "___SLabel_uwgyz_gg_",
50
- "_theme_custom": "_theme_custom_uwgyz_gg_",
51
- "--color": "--color_gatqwf",
52
- "--backgroundColor": "--backgroundColor_gatqwf"
41
+ "__SNotice": "___SNotice_1ldal_gg_",
42
+ "_theme_info": "_theme_info_1ldal_gg_",
43
+ "__SCloseIcon": "___SCloseIcon_1ldal_gg_",
44
+ "_theme_danger": "_theme_danger_1ldal_gg_",
45
+ "_theme_warning": "_theme_warning_1ldal_gg_",
46
+ "_theme_success": "_theme_success_1ldal_gg_",
47
+ "__SContent": "___SContent_1ldal_gg_",
48
+ "__SActions": "___SActions_1ldal_gg_",
49
+ "__SLabel": "___SLabel_1ldal_gg_",
50
+ "_theme_custom": "_theme_custom_1ldal_gg_",
51
+ "--color": "--color_1ldal",
52
+ "--backgroundColor": "--backgroundColor_1ldal"
53
53
  });
54
54
 
55
55
  function isCustomTheme(theme) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Notice.jsx"],"names":["React","createComponent","Component","sstyled","Root","Box","Close","resolveColor","FadeInOut","logger","NoticeGlobal","isCustomTheme","theme","includes","RootNotice","asProps","SNotice","Children","styles","hidden","use","color","useTheme","warn","displayName","style","duration","Label","SLabel","Actions","SActions","Content","SContent","CloseIcon","SCloseIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,OAArC,EAA8CC,IAA9C,QAA0D,eAA1D;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,OAAOC,KAAP,MAAkB,uBAAlB;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,OAAOC,MAAP,MAAmB,2BAAnB;AACA,OAAOC,YAAP,MAAyB,wBAAzB;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASC,aAAT,CAAuBC,KAAvB,EAA8B;AAC5B,SAAO,CAAC,CAAC,QAAD,EAAW,SAAX,EAAsB,SAAtB,EAAiC,MAAjC,EAAyCC,QAAzC,CAAkDD,KAAlD,CAAR;AACD;;IAEKE,U;;;;;;;;;;;;;WAQJ,yBAAgB;AACd,UAAQF,KAAR,GAAkB,KAAKG,OAAvB,CAAQH,KAAR;AACA,aAAO;AACLA,QAAAA,KAAK,EAALA;AADK,OAAP;AAGD;;;WAED,kBAAS;AAAA;AAAA;;AACP,UAAMI,OAAO,GAgBDR,SAhBZ;AACA,0BAAiD,KAAKO,OAAtD;AAAA,UAAQE,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,MAAlB,iBAAkBA,MAAlB;AAAA,UAA0BC,MAA1B,iBAA0BA,MAA1B;AAAA,UAAkCP,KAAlC,iBAAkCA,KAAlC;AAAA,UAAyCQ,GAAzC,iBAAyCA,GAAzC;AACA,UAAMC,KAAK,GAAGd,YAAY,CAACK,KAAD,CAA1B;AACA,UAAMU,QAAQ,GAAGX,aA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ADzC;AACA,iBAAOF,OAAO,CAACe,MAAD,CAAd,eAAuB,oBAAC,QAAD,oEAAvB;AACD;;AAED,SAASe,SAAT,SAA+B;AAAA;AAAA;;AAAA,MAAVf,MAAU,UAAVA,MAAU;AAC7B,MAAMgB,UAAU,GAEM7B,GAFtB;AACA,kBAAOF,OAAO,CAACe,MAAD,CAAd,eACE,oBAAC,UAAD;AAAA,WAA8BZ,KAA9B;AAAA;AAAA,kBAA4D;AAA5D,cADF;AAGD;;AAED,eAAeL,eAAe,CAACa,UAAD,EAAa;AACzCa,EAAAA,KAAK,EAALA,KADyC;AAEzCE,EAAAA,OAAO,EAAPA,OAFyC;AAGzCE,EAAAA,OAAO,EAAPA,OAHyC;AAIzCE,EAAAA,SAAS,EAATA;AAJyC,CAAb,CAA9B","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport Close from '@semcore/icon/Close/m';\nimport resolveColor from '@semcore/utils/lib/color';\nimport { FadeInOut } from '@semcore/animation';\nimport logger from '@semcore/utils/lib/logger';\nimport NoticeGlobal from '@semcore/notice-global';\n\nimport style from './style/notice.shadow.css';\n\nfunction isCustomTheme(theme) {\n return !['danger', 'warning', 'success', 'info'].includes(theme);\n}\n\nclass RootNotice extends Component {\n static displayName = 'Notice';\n static style = style;\n static defaultProps = {\n theme: 'info',\n duration: 250,\n };\n\n getLabelProps() {\n const { theme } = this.asProps;\n return {\n theme,\n };\n }\n\n render() {\n const SNotice = Root;\n const { Children, styles, hidden, theme, use } = this.asProps;\n const color = resolveColor(theme);\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n\n if (use === 'primary') {\n logger.warn(\n true,\n `This deprecated property, you should use component <NoticeGlobal/>`,\n RootNotice.displayName,\n );\n return <NoticeGlobal {...this.asProps} />;\n }\n\n return sstyled(styles)(\n <SNotice\n render={FadeInOut}\n visible={!hidden}\n use:theme={useTheme}\n backgroundColor={color}\n role=\"alert\"\n >\n <Children />\n </SNotice>,\n );\n }\n}\n\nfunction Label({ styles, theme }) {\n const SLabel = Root;\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n const color = resolveColor(theme);\n return sstyled(styles)(<SLabel render={Box} use:theme={useTheme} color={color} />);\n}\n\nfunction Actions({ styles }) {\n const SActions = Root;\n return sstyled(styles)(<SActions render={Box} />);\n}\n\nfunction Content({ styles }) {\n const SContent = Root;\n return sstyled(styles)(<SContent render={Box} />);\n}\n\nfunction CloseIcon({ styles }) {\n const SCloseIcon = Root;\n return sstyled(styles)(\n <SCloseIcon render={Box} tag={Close} interactive aria-label=\"Close alert\" />,\n );\n}\n\nexport default createComponent(RootNotice, {\n Label,\n Actions,\n Content,\n CloseIcon,\n});\n"],"file":"Notice.js"}
1
+ {"version":3,"file":"Notice.js","names":["React","createComponent","Component","sstyled","Root","Box","Close","resolveColor","FadeInOut","logger","NoticeGlobal","isCustomTheme","theme","includes","RootNotice","asProps","SNotice","Children","styles","hidden","use","color","useTheme","warn","displayName","style","duration","Label","SLabel","Actions","SActions","Content","SContent","CloseIcon","SCloseIcon"],"sources":["../../src/Notice.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport Close from '@semcore/icon/Close/m';\nimport resolveColor from '@semcore/utils/lib/color';\nimport { FadeInOut } from '@semcore/animation';\nimport logger from '@semcore/utils/lib/logger';\nimport NoticeGlobal from '@semcore/notice-global';\n\nimport style from './style/notice.shadow.css';\n\nfunction isCustomTheme(theme) {\n return !['danger', 'warning', 'success', 'info'].includes(theme);\n}\n\nclass RootNotice extends Component {\n static displayName = 'Notice';\n static style = style;\n static defaultProps = {\n theme: 'info',\n duration: 250,\n };\n\n getLabelProps() {\n const { theme } = this.asProps;\n return {\n theme,\n };\n }\n\n render() {\n const SNotice = Root;\n const { Children, styles, hidden, theme, use } = this.asProps;\n const color = resolveColor(theme);\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n\n if (use === 'primary') {\n logger.warn(\n true,\n `This deprecated property, you should use component <NoticeGlobal/>`,\n RootNotice.displayName,\n );\n return <NoticeGlobal {...this.asProps} />;\n }\n\n return sstyled(styles)(\n <SNotice\n render={FadeInOut}\n visible={!hidden}\n use:theme={useTheme}\n backgroundColor={color}\n role=\"alert\"\n >\n <Children />\n </SNotice>,\n );\n }\n}\n\nfunction Label({ styles, theme }) {\n const SLabel = Root;\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n const color = resolveColor(theme);\n return sstyled(styles)(<SLabel render={Box} use:theme={useTheme} color={color} />);\n}\n\nfunction Actions({ styles }) {\n const SActions = Root;\n return sstyled(styles)(<SActions render={Box} />);\n}\n\nfunction Content({ styles }) {\n const SContent = Root;\n return sstyled(styles)(<SContent render={Box} />);\n}\n\nfunction CloseIcon({ styles }) {\n const SCloseIcon = Root;\n return sstyled(styles)(\n <SCloseIcon render={Box} tag={Close} interactive aria-label=\"Close alert\" />,\n );\n}\n\nexport default createComponent(RootNotice, {\n Label,\n Actions,\n Content,\n CloseIcon,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,OAArC,EAA8CC,IAA9C,QAA0D,eAA1D;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,OAAOC,KAAP,MAAkB,uBAAlB;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,OAAOC,MAAP,MAAmB,2BAAnB;AACA,OAAOC,YAAP,MAAyB,wBAAzB;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASC,aAAT,CAAuBC,KAAvB,EAA8B;EAC5B,OAAO,CAAC,CAAC,QAAD,EAAW,SAAX,EAAsB,SAAtB,EAAiC,MAAjC,EAAyCC,QAAzC,CAAkDD,KAAlD,CAAR;AACD;;IAEKE,U;;;;;;;;;;;;;WAQ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AAMS,KAAK,GAAGd,YAAY,CAACK,KAAD,CAA1B;EACA,eAAOT,OAAO,CAACe,MAAD,CAAd,eAAuB,oBAAC,MAAD;IAAA,aAAgCI,QAAhC;IAAA,SAAiDD;EAAjD,YAAvB;AACD;;AAED,SAASQ,OAAT,SAA6B;EAAA;EAAA;;EAAA,IAAVX,MAAU,UAAVA,MAAU;EAC3B,IAAMY,QAAQ,GAC2BzB,GADzC;EACA,eAAOF,OAAO,CAACe,MAAD,CAAd,eAAuB,oBAAC,QAAD,oEAAvB;AACD;;AAED,SAASa,OAAT,SAA6B;EAAA;EAAA;;EAAA,IAAVb,MAAU,UAAVA,MAAU;EAC3B,IAAMc,QAAQ,GAC2B3B,GADzC;EACA,eAAOF,OAAO,CAACe,MAAD,CAAd,eAAuB,oBAAC,QAAD,oEAAvB;AACD;;AAED,SAASe,SAAT,SAA+B;EAAA;EAAA;;EAAA,IAAVf,MAAU,UAAVA,MAAU;EAC7B,IAAMgB,UAAU,GAEM7B,GAFtB;EACA,gBAAOF,OAAO,CAACe,MAAD,CAAd,eACE,oBAAC,UAAD;IAAA,OAA8BZ,KAA9B;IAAA;IAAA,cAA4D;EAA5D,YADF;AAGD;;AAED,eAAeL,eAAe,CAACa,UAAD,EAAa;EACzCa,KAAK,EAALA,KADyC;EAEzCE,OAAO,EAAPA,OAFyC;EAGzCE,OAAO,EAAPA,OAHyC;EAIzCE,SAAS,EAATA;AAJyC,CAAb,CAA9B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/NoticeSmart.jsx"],"names":["React","createComponent","Component","Root","isNode","Notice","NoticeSmart","SNoticeSmart","asProps","Children","label","actions","closable","onClose","theme"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,QAAiD,eAAjD;AACA,OAAOC,MAAP,MAAmB,2BAAnB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;IAEMC,W;;;;;;;;;;;;;WAOJ,kBAAS;AAAA;AACP,UAAMC,YAAY,GAGMF,MAHxB;AACA,0BAAwD,KAAKG,OAA7D;AAAA,UAAQC,QAAR,iBAAQA,QAAR;AAAA,UAAkBC,KAAlB,iBAAkBA,KAAlB;AAAA,UAAyBC,OAAzB,iBAAyBA,OAAzB;AAAA,UAAkCC,QAAlC,iBAAkCA,QAAlC;AAAA,UAA4CC,OAA5C,iBAA4CA,OAA5C;AACA,0BACE,oBAAC,YAAD,0BACGT,MAAM,CAACM,KAAD,CAAN,iBAAiB,oBAAC,MAAD,CAAQ,KAAR,QAAeA,KAAf,CADpB,eAEE,oBAAC,MAAD,CAAQ,OAAR,qBACE,oBAAC,QAAD,OADF,EAEGN,MAAM,CAACO,OAAD,CAAN,iBAAmB,oBAAC,MAAD,CAAQ,OAAR,QAAiBA,OAAjB,CAFtB,CAFF,EAMGC,QAAQ,iBAAI,oBAAC,MAAD,CAAQ,SAAR;AAAkB,QAAA,OAAO,EAAEC;AAA3B,QANf,CADF;AAUD;;;;EApBuBX,S;;gBAApBI,W,iBACiB,a;;gBADjBA,W,kBAGkB;AACpBQ,EAAAA,KAAK,EAAE;AADa,C;;AAoBxB,eAAeb,eAAe,CAACK,WAAD,CAA9B","sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\nimport Notice from './Notice';\n\nclass NoticeSmart extends Component {\n static displayName = 'NoticeSmart';\n\n static defaultProps = {\n theme: 'info',\n };\n\n render() {\n const SNoticeSmart = Root;\n const { Children, label, actions, closable, onClose } = this.asProps;\n return (\n <SNoticeSmart render={Notice}>\n {isNode(label) && <Notice.Label>{label}</Notice.Label>}\n <Notice.Content>\n <Children />\n {isNode(actions) && <Notice.Actions>{actions}</Notice.Actions>}\n </Notice.Content>\n {closable && <Notice.CloseIcon onClick={onClose} />}\n </SNoticeSmart>\n );\n }\n}\n\nexport default createComponent(NoticeSmart);\n"],"file":"NoticeSmart.js"}
1
+ {"version":3,"file":"NoticeSmart.js","names":["React","createComponent","Component","Root","isNode","Notice","NoticeSmart","SNoticeSmart","asProps","Children","label","actions","closable","onClose","theme"],"sources":["../../src/NoticeSmart.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\nimport Notice from './Notice';\n\nclass NoticeSmart extends Component {\n static displayName = 'NoticeSmart';\n\n static defaultProps = {\n theme: 'info',\n };\n\n render() {\n const SNoticeSmart = Root;\n const { Children, label, actions, closable, onClose } = this.asProps;\n return (\n <SNoticeSmart render={Notice}>\n {isNode(label) && <Notice.Label>{label}</Notice.Label>}\n <Notice.Content>\n <Children />\n {isNode(actions) && <Notice.Actions>{actions}</Notice.Actions>}\n </Notice.Content>\n {closable && <Notice.CloseIcon onClick={onClose} />}\n </SNoticeSmart>\n );\n }\n}\n\nexport default createComponent(NoticeSmart);\n"],"mappings":";;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,IAArC,QAAiD,eAAjD;AACA,OAAOC,MAAP,MAAmB,2BAAnB;AACA,OAAOC,MAAP,MAAmB,UAAnB;;IAEMC,W;;;;;;;;;;;;;WAOJ,kBAAS;MAAA;MACP,IAAMC,YAAY,GAGMF,MAHxB;MACA,oBAAwD,KAAKG,OAA7D;MAAA,IAAQC,QAAR,iBAAQA,QAAR;MAAA,IAAkBC,KAAlB,iBAAkBA,KAAlB;MAAA,IAAyBC,OAAzB,iBAAyBA,OAAzB;MAAA,IAAkCC,QAAlC,iBAAkCA,QAAlC;MAAA,IAA4CC,OAA5C,iBAA4CA,OAA5C;MACA,oBACE,oBAAC,YAAD,0BACGT,MAAM,CAACM,KAAD,CAAN,iBAAiB,oBAAC,MAAD,CAAQ,KAAR,QAAeA,KAAf,CADpB,eAEE,oBAAC,MAAD,CAAQ,OAAR,qBACE,oBAAC,QAAD,OADF,EAEGN,MAAM,CAACO,OAAD,CAAN,iBAAmB,oBAAC,MAAD,CAAQ,OAAR,QAAiBA,OAAjB,CAFtB,CAFF,EAMGC,QAAQ,iBAAI,oBAAC,MAAD,CAAQ,SAAR;QAAkB,OAAO,EAAEC;MAA3B,EANf,CADF;IAUD;;;;EApBuBX,S;;gBAApBI,W,iBACiB,a;;gBADjBA,W,kBAGkB;EACpBQ,KAAK,EAAE;AADa,C;;AAoBxB,eAAeb,eAAe,CAACK,WAAD,CAA9B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.js"],"names":["default","Notice","NoticeSmart"],"mappings":"AAAA,SAASA,OAAO,IAAIC,MAApB,QAAkC,UAAlC;AAEA,eAAeA,MAAf;AACA,SAASD,OAAO,IAAIE,WAApB,QAAuC,eAAvC","sourcesContent":["import { default as Notice } from './Notice';\n\nexport default Notice;\nexport { default as NoticeSmart } from './NoticeSmart';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["default","Notice","NoticeSmart"],"sources":["../../src/index.js"],"sourcesContent":["import { default as Notice } from './Notice';\n\nexport default Notice;\nexport { default as NoticeSmart } from './NoticeSmart';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,MAApB,QAAkC,UAAlC;AAEA,eAAeA,MAAf;AACA,SAASD,OAAO,IAAIE,WAApB,QAAuC,eAAvC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@semcore/notice",
3
3
  "description": "SEMRush Notice Component",
4
- "version": "4.1.2",
4
+ "version": "4.1.5",
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": "Roman Lysov <r.lysov@semrush.com>",
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/Notice.jsx DELETED
@@ -1,89 +0,0 @@
1
- import React from 'react';
2
- import createComponent, { Component, sstyled, Root } from '@semcore/core';
3
- import { Box } from '@semcore/flex-box';
4
- import Close from '@semcore/icon/Close/m';
5
- import resolveColor from '@semcore/utils/lib/color';
6
- import { FadeInOut } from '@semcore/animation';
7
- import logger from '@semcore/utils/lib/logger';
8
- import NoticeGlobal from '@semcore/notice-global';
9
-
10
- import style from './style/notice.shadow.css';
11
-
12
- function isCustomTheme(theme) {
13
- return !['danger', 'warning', 'success', 'info'].includes(theme);
14
- }
15
-
16
- class RootNotice extends Component {
17
- static displayName = 'Notice';
18
- static style = style;
19
- static defaultProps = {
20
- theme: 'info',
21
- duration: 250,
22
- };
23
-
24
- getLabelProps() {
25
- const { theme } = this.asProps;
26
- return {
27
- theme,
28
- };
29
- }
30
-
31
- render() {
32
- const SNotice = Root;
33
- const { Children, styles, hidden, theme, use } = this.asProps;
34
- const color = resolveColor(theme);
35
- const useTheme = isCustomTheme(theme) ? 'custom' : theme;
36
-
37
- if (use === 'primary') {
38
- logger.warn(
39
- true,
40
- `This deprecated property, you should use component <NoticeGlobal/>`,
41
- RootNotice.displayName,
42
- );
43
- return <NoticeGlobal {...this.asProps} />;
44
- }
45
-
46
- return sstyled(styles)(
47
- <SNotice
48
- render={FadeInOut}
49
- visible={!hidden}
50
- use:theme={useTheme}
51
- backgroundColor={color}
52
- role="alert"
53
- >
54
- <Children />
55
- </SNotice>,
56
- );
57
- }
58
- }
59
-
60
- function Label({ styles, theme }) {
61
- const SLabel = Root;
62
- const useTheme = isCustomTheme(theme) ? 'custom' : theme;
63
- const color = resolveColor(theme);
64
- return sstyled(styles)(<SLabel render={Box} use:theme={useTheme} color={color} />);
65
- }
66
-
67
- function Actions({ styles }) {
68
- const SActions = Root;
69
- return sstyled(styles)(<SActions render={Box} />);
70
- }
71
-
72
- function Content({ styles }) {
73
- const SContent = Root;
74
- return sstyled(styles)(<SContent render={Box} />);
75
- }
76
-
77
- function CloseIcon({ styles }) {
78
- const SCloseIcon = Root;
79
- return sstyled(styles)(
80
- <SCloseIcon render={Box} tag={Close} interactive aria-label="Close alert" />,
81
- );
82
- }
83
-
84
- export default createComponent(RootNotice, {
85
- Label,
86
- Actions,
87
- Content,
88
- CloseIcon,
89
- });
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import createComponent, { Component, Root } from '@semcore/core';
3
- import isNode from '@semcore/utils/lib/isNode';
4
- import Notice from './Notice';
5
-
6
- class NoticeSmart extends Component {
7
- static displayName = 'NoticeSmart';
8
-
9
- static defaultProps = {
10
- theme: 'info',
11
- };
12
-
13
- render() {
14
- const SNoticeSmart = Root;
15
- const { Children, label, actions, closable, onClose } = this.asProps;
16
- return (
17
- <SNoticeSmart render={Notice}>
18
- {isNode(label) && <Notice.Label>{label}</Notice.Label>}
19
- <Notice.Content>
20
- <Children />
21
- {isNode(actions) && <Notice.Actions>{actions}</Notice.Actions>}
22
- </Notice.Content>
23
- {closable && <Notice.CloseIcon onClick={onClose} />}
24
- </SNoticeSmart>
25
- );
26
- }
27
- }
28
-
29
- export default createComponent(NoticeSmart);
package/src/index.d.ts DELETED
@@ -1,63 +0,0 @@
1
- import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
2
- import { Box, IBoxProps } from '@semcore/flex-box';
3
- import { IIconProps } from '@semcore/icon';
4
-
5
- export type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | string;
6
- export type NoticeUse = 'primary' | 'secondary';
7
-
8
- export interface INoticeProps extends IBoxProps {
9
- /** Property for managing visibility of Notice */
10
- hidden?: boolean;
11
- /** Notice type
12
- * @deprecated since version ^4.1.0
13
- */
14
- use?: NoticeUse;
15
- /**
16
- * Notice theme
17
- * @default info
18
- */
19
- theme?: NoticeTheme;
20
- /** Duration of animation, ms
21
- * @default 250
22
- */
23
- duration?: number;
24
- }
25
-
26
- export interface INoticeLabelProps extends IBoxProps {
27
- theme?: NoticeTheme;
28
- }
29
-
30
- export interface INoticeContext {
31
- getLabelProps: PropGetterFn;
32
- }
33
-
34
- export interface INoticeSmartProps extends INoticeProps {
35
- /**
36
- * A custom element for additional information
37
- */
38
- label?: React.ReactNode;
39
- /**
40
- * Custom action element
41
- */
42
- actions?: React.ReactNode;
43
- /**
44
- * Adds a Close icon
45
- */
46
- closable?: boolean;
47
- /**
48
- * Callback on a click on the close button
49
- */
50
- onClose?: (event: React.SyntheticEvent) => void;
51
- }
52
-
53
- declare const Notice: (<T>(props: CProps<INoticeProps & T, INoticeContext>) => ReturnEl) & {
54
- Label: <T>(props: INoticeLabelProps & T) => ReturnEl;
55
- Actions: typeof Box;
56
- Content: typeof Box;
57
- CloseIcon: <T>(props: IIconProps & T) => ReturnEl;
58
- };
59
-
60
- declare const NoticeSmart: <T>(props: CProps<INoticeSmartProps & T>) => ReturnEl;
61
-
62
- export { NoticeSmart };
63
- export default Notice;
package/src/index.js DELETED
@@ -1,4 +0,0 @@
1
- import { default as Notice } from './Notice';
2
-
3
- export default Notice;
4
- export { default as NoticeSmart } from './NoticeSmart';
@@ -1,110 +0,0 @@
1
- @import '@semcore/utils/style/var.css';
2
-
3
- SNotice {
4
- display: flex;
5
- padding: 16px;
6
- font-size: var(--fs-200);
7
- line-height: var(--lh-200);
8
- box-sizing: border-box;
9
- border-style: solid;
10
- border-width: 1px;
11
- border-radius: var(--rounded-m);
12
- }
13
-
14
- SNotice[theme='info'] {
15
- background-color: var(--blue-50);
16
- border-color: var(--blue-200);
17
-
18
- & SCloseIcon {
19
- color: var(--blue-400);
20
-
21
- &:hover {
22
- color: var(--blue-500);
23
- }
24
- }
25
- }
26
-
27
- SNotice[theme='danger'] {
28
- background-color: var(--red-50);
29
- border-color: var(--red-200);
30
-
31
- & SCloseIcon {
32
- color: var(--red-400);
33
-
34
- &:hover {
35
- color: var(--red-500);
36
- }
37
- }
38
- }
39
-
40
- SNotice[theme='warning'] {
41
- background-color: var(--orange-50);
42
- border-color: var(--orange-200);
43
-
44
- & SCloseIcon {
45
- color: var(--orange-400);
46
-
47
- &:hover {
48
- color: var(--orange-500);
49
- }
50
- }
51
- }
52
-
53
- SNotice[theme='success'] {
54
- background-color: var(--green-50);
55
- border-color: var(--green-200);
56
-
57
- & SCloseIcon {
58
- color: var(--green-400);
59
-
60
- &:hover {
61
- color: var(--green-500);
62
- }
63
- }
64
- }
65
-
66
- SContent {
67
- flex: 1 1 auto;
68
- width: 100%;
69
- }
70
-
71
- SActions {
72
- flex-shrink: 0;
73
- margin-top: 12px;
74
- }
75
-
76
- SLabel {
77
- margin-top: 2px;
78
- margin-right: 8px;
79
- display: inline-flex;
80
- }
81
-
82
- SLabel[theme='info'] {
83
- color: var(--gray-400);
84
- }
85
-
86
- SLabel[theme='danger'] {
87
- color: var(--red-400);
88
- }
89
-
90
- SLabel[theme='warning'] {
91
- color: var(--orange-400);
92
- }
93
-
94
- SLabel[theme='success'] {
95
- color: var(--green-400);
96
- }
97
-
98
- SLabel[theme='custom'] {
99
- color: var(--color);
100
- }
101
-
102
- SCloseIcon {
103
- flex-shrink: 0;
104
- margin-left: 16px;
105
- }
106
-
107
- SNotice[theme='custom'] {
108
- background-color: var(--backgroundColor);
109
- border-color: var(--backgroundColor);
110
- }