@semcore/notice 3.1.2 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md 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.0] - 2022-01-18
6
+
7
+ ### Changed
8
+
9
+ - Up version icons and use new icon.
10
+
5
11
  ## [3.1.2] - 2021-12-08
6
12
 
7
13
  ### Changed
package/lib/cjs/Notice.js CHANGED
@@ -27,7 +27,7 @@ var _react = _interopRequireDefault(require("react"));
27
27
 
28
28
  var _flexBox = require("@semcore/flex-box");
29
29
 
30
- var _xs = _interopRequireDefault(require("@semcore/icon/lib/Close/xs"));
30
+ var _m = _interopRequireDefault(require("@semcore/icon/Close/m"));
31
31
 
32
32
  var _color = _interopRequireDefault(require("@semcore/utils/lib/color"));
33
33
 
@@ -46,24 +46,24 @@ var style = (
46
46
  /*__reshadow_css_start__*/
47
47
  _core.sstyled.insert(
48
48
  /*__inner_css_start__*/
49
- ".___SNotice_1cprg_gg_{display:flex;font-size:12px;line-height:1.5;box-sizing:border-box}.___SNotice_1cprg_gg_._use_primary_1cprg_gg_{padding:8px 32px}.___SNotice_1cprg_gg_._use_secondary_1cprg_gg_{padding:15px;border-style:solid;border-width:1px;border-radius:2px}.___SNotice_1cprg_gg_._theme_info_1cprg_gg_{background-color:rgba(43,148,225,.15)}.___SNotice_1cprg_gg_._theme_info_1cprg_gg_._use_secondary_1cprg_gg_{border-color:rgba(43,148,225,.25)}.___SNotice_1cprg_gg_._theme_danger_1cprg_gg_{background-color:rgba(237,45,45,.1)}.___SNotice_1cprg_gg_._theme_danger_1cprg_gg_._use_secondary_1cprg_gg_{border-color:rgba(237,45,45,.2)}.___SNotice_1cprg_gg_._theme_warning_1cprg_gg_{background-color:rgba(249,177,89,.15)}.___SNotice_1cprg_gg_._theme_warning_1cprg_gg_._use_secondary_1cprg_gg_{border-color:rgba(249,177,89,.4)}.___SNotice_1cprg_gg_._theme_success_1cprg_gg_{background-color:rgba(79,174,51,.15)}.___SNotice_1cprg_gg_._theme_success_1cprg_gg_._use_secondary_1cprg_gg_{border-color:rgba(79,174,51,.3)}.___SContent_1cprg_gg_{flex:1 1 auto;width:100%}.___SActions_1cprg_gg_{flex-shrink:0;margin-top:12px}.___SLabel_1cprg_gg_{margin-right:8px;display:inline-flex}.___SLabel_1cprg_gg_._theme_danger_1cprg_gg_{color:#ed2d2d}.___SLabel_1cprg_gg_._theme_info_1cprg_gg_{color:#a6b0b3}.___SLabel_1cprg_gg_._theme_success_1cprg_gg_{color:#4fae33}.___SLabel_1cprg_gg_._theme_warning_1cprg_gg_{color:#f9b159}.___SLabel_1cprg_gg_._theme_custom_1cprg_gg_{color:var(--color_1du3pp1)}.___SCloseIcon_1cprg_gg_{flex-shrink:0;margin-left:16px}.___SNotice_1cprg_gg_._theme_custom_1cprg_gg_{background-color:var(--backgroundColor_1du3pp1)}.___SNotice_1cprg_gg_._theme_custom_1cprg_gg_._use_secondary_1cprg_gg_{border-color:var(--backgroundColor_1du3pp1)}"
49
+ ".___SNotice_1tywf_gg_{display:flex;font-size:12px;line-height:1.5;box-sizing:border-box}.___SNotice_1tywf_gg_._use_primary_1tywf_gg_{padding:8px 32px}.___SNotice_1tywf_gg_._use_secondary_1tywf_gg_{padding:15px;border-style:solid;border-width:1px;border-radius:2px}.___SNotice_1tywf_gg_._theme_info_1tywf_gg_{background-color:rgba(43,148,225,.15)}.___SNotice_1tywf_gg_._theme_info_1tywf_gg_._use_secondary_1tywf_gg_{border-color:rgba(43,148,225,.25)}.___SNotice_1tywf_gg_._theme_danger_1tywf_gg_{background-color:rgba(237,45,45,.1)}.___SNotice_1tywf_gg_._theme_danger_1tywf_gg_._use_secondary_1tywf_gg_{border-color:rgba(237,45,45,.2)}.___SNotice_1tywf_gg_._theme_warning_1tywf_gg_{background-color:rgba(249,177,89,.15)}.___SNotice_1tywf_gg_._theme_warning_1tywf_gg_._use_secondary_1tywf_gg_{border-color:rgba(249,177,89,.4)}.___SNotice_1tywf_gg_._theme_success_1tywf_gg_{background-color:rgba(79,174,51,.15)}.___SNotice_1tywf_gg_._theme_success_1tywf_gg_._use_secondary_1tywf_gg_{border-color:rgba(79,174,51,.3)}.___SContent_1tywf_gg_{flex:1 1 auto;width:100%}.___SActions_1tywf_gg_{flex-shrink:0;margin-top:12px}.___SLabel_1tywf_gg_{margin-right:8px;display:inline-flex}.___SLabel_1tywf_gg_._theme_danger_1tywf_gg_{color:#ed2d2d}.___SLabel_1tywf_gg_._theme_info_1tywf_gg_{color:#a6b0b3}.___SLabel_1tywf_gg_._theme_success_1tywf_gg_{color:#4fae33}.___SLabel_1tywf_gg_._theme_warning_1tywf_gg_{color:#f9b159}.___SLabel_1tywf_gg_._theme_custom_1tywf_gg_{color:var(--color_1du3pp1)}.___SCloseIcon_1tywf_gg_{flex-shrink:0;margin-left:16px}.___SNotice_1tywf_gg_._theme_custom_1tywf_gg_{background-color:var(--backgroundColor_1du3pp1)}.___SNotice_1tywf_gg_._theme_custom_1tywf_gg_._use_secondary_1tywf_gg_{border-color:var(--backgroundColor_1du3pp1)}"
50
50
  /*__inner_css_end__*/
51
51
  , "1du3pp1_gg_")
52
52
  /*__reshadow_css_end__*/
53
53
  , {
54
- "__SNotice": "___SNotice_1cprg_gg_",
55
- "_use_primary": "_use_primary_1cprg_gg_",
56
- "_use_secondary": "_use_secondary_1cprg_gg_",
57
- "_theme_info": "_theme_info_1cprg_gg_",
58
- "_theme_danger": "_theme_danger_1cprg_gg_",
59
- "_theme_warning": "_theme_warning_1cprg_gg_",
60
- "_theme_success": "_theme_success_1cprg_gg_",
61
- "__SContent": "___SContent_1cprg_gg_",
62
- "__SActions": "___SActions_1cprg_gg_",
63
- "__SLabel": "___SLabel_1cprg_gg_",
64
- "_theme_custom": "_theme_custom_1cprg_gg_",
54
+ "__SNotice": "___SNotice_1tywf_gg_",
55
+ "_use_primary": "_use_primary_1tywf_gg_",
56
+ "_use_secondary": "_use_secondary_1tywf_gg_",
57
+ "_theme_info": "_theme_info_1tywf_gg_",
58
+ "_theme_danger": "_theme_danger_1tywf_gg_",
59
+ "_theme_warning": "_theme_warning_1tywf_gg_",
60
+ "_theme_success": "_theme_success_1tywf_gg_",
61
+ "__SContent": "___SContent_1tywf_gg_",
62
+ "__SActions": "___SActions_1tywf_gg_",
63
+ "__SLabel": "___SLabel_1tywf_gg_",
64
+ "_theme_custom": "_theme_custom_1tywf_gg_",
65
65
  "--color": "--color_1du3pp1",
66
- "__SCloseIcon": "___SCloseIcon_1cprg_gg_",
66
+ "__SCloseIcon": "___SCloseIcon_1tywf_gg_",
67
67
  "--backgroundColor": "--backgroundColor_1du3pp1"
68
68
  });
69
69
 
@@ -162,7 +162,7 @@ function CloseIcon(_ref14) {
162
162
  var styles = _ref14.styles;
163
163
  var SCloseIcon = _flexBox.Box;
164
164
  return _ref10 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SCloseIcon, _ref10.cn("SCloseIcon", _objectSpread({}, (0, _core.assignProps)({
165
- "tag": _xs["default"],
165
+ "tag": _m["default"],
166
166
  "color": "stone",
167
167
  "interactive": true,
168
168
  "aria-label": "Close alert"
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Notice.js"],"names":["isCustomTheme","theme","includes","RootNotice","asProps","SNotice","FadeInOut","Children","styles","hidden","color","useTheme","Component","style","use","duration","Label","SLabel","Box","Actions","SActions","Content","SContent","CloseIcon","SCloseIcon","CloseXS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;AAC5B,SAAO,CAAC,CAAC,QAAD,EAAW,SAAX,EAAsB,SAAtB,EAAiC,MAAjC,EAAyCC,QAAzC,CAAkDD,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AjD,cAAvB;AACD;;AAED,SAASS,OAAT,SAA6B;AAAA;AAAA;;AAAA,MAAVX,MAAU,UAAVA,MAAU;AAC3B,MAAMY,QAAQ,GAC2BF,YADzC;AACA,iBAAO,mBAAQV,MAAR,CAAP,eAAuB,gCAAC,QAAD,6EAAvB;AACD;;AAED,SAASa,OAAT,SAA6B;AAAA;AAAA;;AAAA,MAAVb,MAAU,UAAVA,MAAU;AAC3B,MAAMc,QAAQ,GAC2BJ,YADzC;AACA,iBAAO,mBAAQV,MAAR,CAAP,eAAuB,gCAAC,QAAD,6EAAvB;AACD;;AAED,SAASe,SAAT,SAA+B;AAAA;AAAA;;AAAA,MAAVf,MAAU,UAAVA,MAAU;AAC7B,MAAMgB,UAAU,GAEMN,YAFtB;AACA,kBAAO,mBAAQV,MAAR,CAAP,eACE,gCAAC,UAAD;AAAA,WAA8BiB,cAA9B;AAAA,aAA6C,OAA7C;AAAA;AAAA,kBAA4E;AAA5E,cADF;AAGD;;eAEc,sBAAgBtB,UAAhB,EAA4B;AACzCa,EAAAA,KAAK,EAALA,KADyC;AAEzCG,EAAAA,OAAO,EAAPA,OAFyC;AAGzCE,EAAAA,OAAO,EAAPA,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 CloseXS from '@semcore/icon/lib/Close/xs';\nimport resolveColor from '@semcore/utils/lib/color';\nimport { FadeInOut } from '@semcore/animation';\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 use: 'secondary',\n theme: 'info',\n duration: 200,\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 } = this.asProps;\n const color = resolveColor(theme);\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\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={CloseXS} color=\"stone\" 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,"sources":["../../src/Notice.js"],"names":["isCustomTheme","theme","includes","RootNotice","asProps","SNotice","FadeInOut","Children","styles","hidden","color","useTheme","Component","style","use","duration","Label","SLabel","Box","Actions","SActions","Content","SContent","CloseIcon","SCloseIcon","Close"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;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;;;;;;;;;;;;WASJ,yBAAgB;AAAA,UACNF,KADM,GACI,KAAKG,OADT,CACNH,KADM;AAEd,aAAO;AACLA,QAAAA,KAAK,EAALA;AADK,OAAP;AAGD;;;WAED,kBAAS;AAAA;AAAA;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vB;AACD;;AAED,SAASa,OAAT,SAA6B;AAAA;AAAA;;AAAA,MAAVb,MAAU,UAAVA,MAAU;AAC3B,MAAMc,QAAQ,GAC2BJ,YADzC;AACA,iBAAO,mBAAQV,MAAR,CAAP,eAAuB,gCAAC,QAAD,6EAAvB;AACD;;AAED,SAASe,SAAT,SAA+B;AAAA;AAAA;;AAAA,MAAVf,MAAU,UAAVA,MAAU;AAC7B,MAAMgB,UAAU,GAEMN,YAFtB;AACA,kBAAO,mBAAQV,MAAR,CAAP,eACE,gCAAC,UAAD;AAAA,WAA8BiB,aAA9B;AAAA,aAA2C,OAA3C;AAAA;AAAA,kBAA0E;AAA1E,cADF;AAGD;;eAEc,sBAAgBtB,UAAhB,EAA4B;AACzCa,EAAAA,KAAK,EAALA,KADyC;AAEzCG,EAAAA,OAAO,EAAPA,OAFyC;AAGzCE,EAAAA,OAAO,EAAPA,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';\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 use: 'secondary',\n theme: 'info',\n duration: 200,\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 } = this.asProps;\n const color = resolveColor(theme);\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\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} color=\"stone\" 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"}
package/lib/es6/Notice.js CHANGED
@@ -22,7 +22,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
22
22
  import React from 'react';
23
23
  import createComponent, { Component, sstyled, Root } from '@semcore/core';
24
24
  import { Box } from '@semcore/flex-box';
25
- import CloseXS from '@semcore/icon/lib/Close/xs';
25
+ import Close from '@semcore/icon/Close/m';
26
26
  import resolveColor from '@semcore/utils/lib/color';
27
27
  import { FadeInOut } from '@semcore/animation';
28
28
 
@@ -31,24 +31,24 @@ var style = (
31
31
  /*__reshadow_css_start__*/
32
32
  _sstyled.insert(
33
33
  /*__inner_css_start__*/
34
- ".___SNotice_1cprg_gg_{display:flex;font-size:12px;line-height:1.5;box-sizing:border-box}.___SNotice_1cprg_gg_._use_primary_1cprg_gg_{padding:8px 32px}.___SNotice_1cprg_gg_._use_secondary_1cprg_gg_{padding:15px;border-style:solid;border-width:1px;border-radius:2px}.___SNotice_1cprg_gg_._theme_info_1cprg_gg_{background-color:rgba(43,148,225,.15)}.___SNotice_1cprg_gg_._theme_info_1cprg_gg_._use_secondary_1cprg_gg_{border-color:rgba(43,148,225,.25)}.___SNotice_1cprg_gg_._theme_danger_1cprg_gg_{background-color:rgba(237,45,45,.1)}.___SNotice_1cprg_gg_._theme_danger_1cprg_gg_._use_secondary_1cprg_gg_{border-color:rgba(237,45,45,.2)}.___SNotice_1cprg_gg_._theme_warning_1cprg_gg_{background-color:rgba(249,177,89,.15)}.___SNotice_1cprg_gg_._theme_warning_1cprg_gg_._use_secondary_1cprg_gg_{border-color:rgba(249,177,89,.4)}.___SNotice_1cprg_gg_._theme_success_1cprg_gg_{background-color:rgba(79,174,51,.15)}.___SNotice_1cprg_gg_._theme_success_1cprg_gg_._use_secondary_1cprg_gg_{border-color:rgba(79,174,51,.3)}.___SContent_1cprg_gg_{flex:1 1 auto;width:100%}.___SActions_1cprg_gg_{flex-shrink:0;margin-top:12px}.___SLabel_1cprg_gg_{margin-right:8px;display:inline-flex}.___SLabel_1cprg_gg_._theme_danger_1cprg_gg_{color:#ed2d2d}.___SLabel_1cprg_gg_._theme_info_1cprg_gg_{color:#a6b0b3}.___SLabel_1cprg_gg_._theme_success_1cprg_gg_{color:#4fae33}.___SLabel_1cprg_gg_._theme_warning_1cprg_gg_{color:#f9b159}.___SLabel_1cprg_gg_._theme_custom_1cprg_gg_{color:var(--color_1du3pp1)}.___SCloseIcon_1cprg_gg_{flex-shrink:0;margin-left:16px}.___SNotice_1cprg_gg_._theme_custom_1cprg_gg_{background-color:var(--backgroundColor_1du3pp1)}.___SNotice_1cprg_gg_._theme_custom_1cprg_gg_._use_secondary_1cprg_gg_{border-color:var(--backgroundColor_1du3pp1)}"
34
+ ".___SNotice_1tywf_gg_{display:flex;font-size:12px;line-height:1.5;box-sizing:border-box}.___SNotice_1tywf_gg_._use_primary_1tywf_gg_{padding:8px 32px}.___SNotice_1tywf_gg_._use_secondary_1tywf_gg_{padding:15px;border-style:solid;border-width:1px;border-radius:2px}.___SNotice_1tywf_gg_._theme_info_1tywf_gg_{background-color:rgba(43,148,225,.15)}.___SNotice_1tywf_gg_._theme_info_1tywf_gg_._use_secondary_1tywf_gg_{border-color:rgba(43,148,225,.25)}.___SNotice_1tywf_gg_._theme_danger_1tywf_gg_{background-color:rgba(237,45,45,.1)}.___SNotice_1tywf_gg_._theme_danger_1tywf_gg_._use_secondary_1tywf_gg_{border-color:rgba(237,45,45,.2)}.___SNotice_1tywf_gg_._theme_warning_1tywf_gg_{background-color:rgba(249,177,89,.15)}.___SNotice_1tywf_gg_._theme_warning_1tywf_gg_._use_secondary_1tywf_gg_{border-color:rgba(249,177,89,.4)}.___SNotice_1tywf_gg_._theme_success_1tywf_gg_{background-color:rgba(79,174,51,.15)}.___SNotice_1tywf_gg_._theme_success_1tywf_gg_._use_secondary_1tywf_gg_{border-color:rgba(79,174,51,.3)}.___SContent_1tywf_gg_{flex:1 1 auto;width:100%}.___SActions_1tywf_gg_{flex-shrink:0;margin-top:12px}.___SLabel_1tywf_gg_{margin-right:8px;display:inline-flex}.___SLabel_1tywf_gg_._theme_danger_1tywf_gg_{color:#ed2d2d}.___SLabel_1tywf_gg_._theme_info_1tywf_gg_{color:#a6b0b3}.___SLabel_1tywf_gg_._theme_success_1tywf_gg_{color:#4fae33}.___SLabel_1tywf_gg_._theme_warning_1tywf_gg_{color:#f9b159}.___SLabel_1tywf_gg_._theme_custom_1tywf_gg_{color:var(--color_1du3pp1)}.___SCloseIcon_1tywf_gg_{flex-shrink:0;margin-left:16px}.___SNotice_1tywf_gg_._theme_custom_1tywf_gg_{background-color:var(--backgroundColor_1du3pp1)}.___SNotice_1tywf_gg_._theme_custom_1tywf_gg_._use_secondary_1tywf_gg_{border-color:var(--backgroundColor_1du3pp1)}"
35
35
  /*__inner_css_end__*/
36
36
  , "1du3pp1_gg_")
37
37
  /*__reshadow_css_end__*/
38
38
  , {
39
- "__SNotice": "___SNotice_1cprg_gg_",
40
- "_use_primary": "_use_primary_1cprg_gg_",
41
- "_use_secondary": "_use_secondary_1cprg_gg_",
42
- "_theme_info": "_theme_info_1cprg_gg_",
43
- "_theme_danger": "_theme_danger_1cprg_gg_",
44
- "_theme_warning": "_theme_warning_1cprg_gg_",
45
- "_theme_success": "_theme_success_1cprg_gg_",
46
- "__SContent": "___SContent_1cprg_gg_",
47
- "__SActions": "___SActions_1cprg_gg_",
48
- "__SLabel": "___SLabel_1cprg_gg_",
49
- "_theme_custom": "_theme_custom_1cprg_gg_",
39
+ "__SNotice": "___SNotice_1tywf_gg_",
40
+ "_use_primary": "_use_primary_1tywf_gg_",
41
+ "_use_secondary": "_use_secondary_1tywf_gg_",
42
+ "_theme_info": "_theme_info_1tywf_gg_",
43
+ "_theme_danger": "_theme_danger_1tywf_gg_",
44
+ "_theme_warning": "_theme_warning_1tywf_gg_",
45
+ "_theme_success": "_theme_success_1tywf_gg_",
46
+ "__SContent": "___SContent_1tywf_gg_",
47
+ "__SActions": "___SActions_1tywf_gg_",
48
+ "__SLabel": "___SLabel_1tywf_gg_",
49
+ "_theme_custom": "_theme_custom_1tywf_gg_",
50
50
  "--color": "--color_1du3pp1",
51
- "__SCloseIcon": "___SCloseIcon_1cprg_gg_",
51
+ "__SCloseIcon": "___SCloseIcon_1tywf_gg_",
52
52
  "--backgroundColor": "--backgroundColor_1du3pp1"
53
53
  });
54
54
 
@@ -151,7 +151,7 @@ function CloseIcon(_ref14) {
151
151
  var styles = _ref14.styles;
152
152
  var SCloseIcon = Box;
153
153
  return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SCloseIcon, _ref10.cn("SCloseIcon", _objectSpread({}, _assignProps5({
154
- "tag": CloseXS,
154
+ "tag": Close,
155
155
  "color": "stone",
156
156
  "interactive": true,
157
157
  "aria-label": "Close alert"
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Notice.js"],"names":["React","createComponent","Component","sstyled","Root","Box","CloseXS","resolveColor","FadeInOut","isCustomTheme","theme","includes","RootNotice","asProps","SNotice","Children","styles","hidden","color","useTheme","style","use","duration","Label","SLabel","Actions","SActions","Content","SContent","CloseIcon","SCloseIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,OAArC,EAA8CC,I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kC;AAAA;AAAA;;AAAA,MAAjBP,MAAiB,UAAjBA,MAAiB;AAAA,MAATN,KAAS,UAATA,KAAS;AAChC,MAAMc,MAAM,GAG2BnB,GAHvC;AACA,MAAMc,QAAQ,GAAGV,aAAa,CAACC,KAAD,CAAb,GAAuB,QAAvB,GAAkCA,KAAnD;AACA,MAAMQ,KAAK,GAAGX,YAAY,CAACG,KAAD,CAA1B;AACA,iBAAOP,OAAO,CAACa,MAAD,CAAd,eAAuB,oBAAC,MAAD;AAAA,iBAAgCG,QAAhC;AAAA,aAAiDD;AAAjD,cAAvB;AACD;;AAED,SAASO,OAAT,SAA6B;AAAA;AAAA;;AAAA,MAAVT,MAAU,UAAVA,MAAU;AAC3B,MAAMU,QAAQ,GAC2BrB,GADzC;AACA,iBAAOF,OAAO,CAACa,MAAD,CAAd,eAAuB,oBAAC,QAAD,oEAAvB;AACD;;AAED,SAASW,OAAT,SAA6B;AAAA;AAAA;;AAAA,MAAVX,MAAU,UAAVA,MAAU;AAC3B,MAAMY,QAAQ,GAC2BvB,GADzC;AACA,iBAAOF,OAAO,CAACa,MAAD,CAAd,eAAuB,oBAAC,QAAD,oEAAvB;AACD;;AAED,SAASa,SAAT,SAA+B;AAAA;AAAA;;AAAA,MAAVb,MAAU,UAAVA,MAAU;AAC7B,MAAMc,UAAU,GAEMzB,GAFtB;AACA,kBAAOF,OAAO,CAACa,MAAD,CAAd,eACE,oBAAC,UAAD;AAAA,WAA8BV,OAA9B;AAAA,aAA6C,OAA7C;AAAA;AAAA,kBAA4E;AAA5E,cADF;AAGD;;AAED,eAAeL,eAAe,CAACW,UAAD,EAAa;AACzCW,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 CloseXS from '@semcore/icon/lib/Close/xs';\nimport resolveColor from '@semcore/utils/lib/color';\nimport { FadeInOut } from '@semcore/animation';\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 use: 'secondary',\n theme: 'info',\n duration: 200,\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 } = this.asProps;\n const color = resolveColor(theme);\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\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={CloseXS} color=\"stone\" 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,"sources":["../../src/Notice.js"],"names":["React","createComponent","Component","sstyled","Root","Box","Close","resolveColor","FadeInOut","isCustomTheme","theme","includes","RootNotice","asProps","SNotice","Children","styles","hidden","color","useTheme","style","use","duration","Label","SLabel","Actions","SActions","Content","SContent","CloseIcon","SCloseIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;A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JyC,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';\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 use: 'secondary',\n theme: 'info',\n duration: 200,\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 } = this.asProps;\n const color = resolveColor(theme);\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\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} color=\"stone\" 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"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/notice",
3
3
  "description": "SEMRush Notice Component",
4
- "version": "3.1.2",
4
+ "version": "3.2.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "@semcore/animation": "^1",
17
17
  "@semcore/utils": "^3.15",
18
18
  "@semcore/flex-box": "^4",
19
- "@semcore/icon": "^2"
19
+ "@semcore/icon": "^2.16"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@semcore/core": "^1.11",
package/src/Notice.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import createComponent, { Component, sstyled, Root } from '@semcore/core';
3
3
  import { Box } from '@semcore/flex-box';
4
- import CloseXS from '@semcore/icon/lib/Close/xs';
4
+ import Close from '@semcore/icon/Close/m';
5
5
  import resolveColor from '@semcore/utils/lib/color';
6
6
  import { FadeInOut } from '@semcore/animation';
7
7
 
@@ -67,7 +67,7 @@ function Content({ styles }) {
67
67
  function CloseIcon({ styles }) {
68
68
  const SCloseIcon = Root;
69
69
  return sstyled(styles)(
70
- <SCloseIcon render={Box} tag={CloseXS} color="stone" interactive aria-label="Close alert" />,
70
+ <SCloseIcon render={Box} tag={Close} color="stone" interactive aria-label="Close alert" />,
71
71
  );
72
72
  }
73
73