@semcore/notice 4.1.17 → 4.1.19

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,35 +2,23 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [4.1.17] - 2022-09-29
6
-
7
- ### Changed
8
-
9
- - Version patch update due to children dependencies update (`@semcore/icon` [2.30.4 ~> 2.31.0]).
10
-
11
- ## [4.1.16] - 2022-09-21
12
-
13
- ### Changed
14
-
15
- - Version patch update due to children dependencies update (`@semcore/icon` [2.30.3 ~> 2.30.4]).
16
-
17
- ## [4.1.15] - 2022-09-21
5
+ ## [4.1.19] - 2022-10-06
18
6
 
19
7
  ### Changed
20
8
 
21
- - Version patch update due to children dependencies update (`@semcore/icon` [2.30.2 ~> 2.30.3]).
9
+ - Version patch update due to children dependencies update (`@semcore/icon` [2.32.2 ~> 2.33.0]).
22
10
 
23
- ## [4.1.14] - 2022-08-30
11
+ ## [4.2.0] - unreleased
24
12
 
25
13
  ### Changed
26
14
 
27
- - Version patch update due to children dependencies update (`@semcore/animation` [1.5.9 ~> 1.5.10], `@semcore/utils` [3.37.0 ~> 3.37.1], `@semcore/flex-box` [4.5.10 ~> 4.5.11], `@semcore/icon` [2.30.1 ~> 2.30.2]).
15
+ - Color for Close icon with theme `info` was changed from `--blue-400` to `--gray-400`.
28
16
 
29
- ## [4.1.13] - 2022-08-29
17
+ ## [4.1.17] - 2022-09-29
30
18
 
31
19
  ### Changed
32
20
 
33
- - Version patch update due to children dependencies update (`@semcore/animation` [1.5.8 ~> 1.5.9]).
21
+ - Version patch update due to children dependencies update (`@semcore/icon` [2.30.4 ~> 2.31.0]).
34
22
 
35
23
  ## [4.1.12] - 2022-08-23
36
24
 
@@ -44,66 +32,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
44
32
 
45
33
  - Version patch update due to children dependencies update (`@semcore/icon` [2.30.0 ~> 2.30.1]).
46
34
 
47
- ## [4.1.10] - 2022-08-18
48
-
49
- ### Changed
50
-
51
- - Version patch update due to children dependencies update (`@semcore/icon` [2.29.5 ~> 2.30.0]).
52
-
53
- ## [4.1.9] - 2022-08-18
54
-
55
- ### Changed
56
-
57
- - Version patch update due to children dependencies update (`@semcore/animation` [1.5.7 ~> 1.5.8], `@semcore/utils` [3.36.0 ~> 3.37.0], `@semcore/flex-box` [4.5.9 ~> 4.5.10], `@semcore/icon` [2.29.4 ~> 2.29.5]).
58
-
59
- ## [4.1.8] - 2022-08-11
60
-
61
- ### Changed
62
-
63
- - Version patch update due to children dependencies update (`@semcore/animation` [1.5.6 ~> 1.5.7], `@semcore/utils` [3.35.1 ~> 3.36.0], `@semcore/flex-box` [4.5.8 ~> 4.5.9], `@semcore/icon` [2.29.3 ~> 2.29.4]).
64
-
65
- ## [4.1.7] - 2022-08-01
66
-
67
- ### Changed
68
-
69
- - Version patch update due to children dependencies update (`@semcore/animation` [1.5.5 ~> 1.5.6], `@semcore/utils` [3.35.0 ~> 3.35.1], `@semcore/flex-box` [4.5.7 ~> 4.5.8], `@semcore/icon` [2.29.2 ~> 2.29.3]).
70
-
71
- ## [4.1.6] - 2022-07-25
72
-
73
- ### Changed
74
-
75
- - Version patch update due to children dependencies update (`@semcore/icon` [2.29.1 ~> 2.29.2]).
76
-
77
- ## [4.1.5] - 2022-07-22
78
-
79
- ### Changed
80
-
81
- - 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]).
82
-
83
- ## [4.1.4] - 2022-07-21
84
-
85
- ### Changed
86
-
87
- - Version patch update due to children dependencies update (`@semcore/icon` [2.28.0 ~> 2.29.0]).
88
-
89
- ## [4.1.3] - 2022-07-07
90
-
91
- ### Changed
92
-
93
- - 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]).
94
-
95
- ## [4.1.2] - 2022-06-02
96
-
97
- ### Changed
98
-
99
- - Version patch update due to children dependencies update (`@semcore/animation` [1.5.2 ~> 1.5.3], `@semcore/utils` [3.32.2 ~> 3.33.0], `@semcore/flex-box` [4.5.4 ~> 4.5.5], `@semcore/icon` [2.26.1 ~> 2.27.0], `@semcore/notice-global` [1.0.1 ~> 1.1.0]).
100
-
101
- ## [4.1.1] - 2022-05-31
102
-
103
- ### Changed
104
-
105
- - Version patch update due to children dependencies update (`@semcore/animation` [1.5.1 ~> 1.5.2], `@semcore/utils` [3.32.1 ~> 3.32.2], `@semcore/flex-box` [4.5.3 ~> 4.5.4], `@semcore/icon` [2.26.0 ~> 2.26.1]).
106
-
107
35
  ## [4.1.0] - 2022-05-30
108
36
 
109
37
  ### Changed
@@ -118,18 +46,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
118
46
 
119
47
  - Version patch update due to children dependencies update (`@semcore/icon` [2.25.1 ~> 2.26.0]).
120
48
 
121
- ## [4.0.2] - 2022-05-19
122
-
123
- ### Changed
124
-
125
- - Version patch update due to children dependencies update (`@semcore/animation` [1.5.0 ~> 1.5.1], `@semcore/utils` [3.32.0 ~> 3.32.1], `@semcore/flex-box` [4.5.1 ~> 4.5.3], `@semcore/icon` [2.25.0 ~> 2.25.1]).
126
-
127
- ## [4.0.1] - 2022-05-18
128
-
129
- ### Changed
130
-
131
- - Version patch update due to children dependencies update (`@semcore/icon` [2.24.0 ~> 2.25.0]).
132
-
133
49
  ## [4.0.0] - 2022-05-17
134
50
 
135
51
  ### BREAK
@@ -144,36 +60,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
144
60
 
145
61
  - Version patch update due to children dependencies update (`@semcore/icon` [2.21.0 ~> 2.24.0]).
146
62
 
147
- ## [3.2.6] - 2022-04-28
148
-
149
- ### Changed
150
-
151
- - Version patch update due to children dependencies update (`@semcore/icon` [2.20.0 ~> 2.21.0]).
152
-
153
- ## [3.2.5] - 2022-04-03
154
-
155
- ### Changed
156
-
157
- - Version patch update due to children dependencies update (`@semcore/animation` [1.5.0 ~> 1.5.0]).
158
-
159
- ## [3.2.4] - 2022-03-21
160
-
161
- ### Changed
162
-
163
- - Version patch update due to children dependencies update (`@semcore/icon` [2.19.4 ~> 2.20.0]).
164
-
165
- ## [3.2.3] - 2022-03-14
166
-
167
- ### Changed
168
-
169
- - Version patch update due to children dependencies update (`@semcore/animation` [1.4.1 ~> 1.4.2], `@semcore/utils` [3.31.2 ~> 3.31.2], `@semcore/flex-box` [4.5.0 ~> 4.5.1], `@semcore/icon` [2.19.3 ~> 2.19.4]).
170
-
171
- ## [3.2.2] - 2022-03-05
172
-
173
- ### Changed
174
-
175
- - Version patch update due to children dependencies update (`@semcore/animation` [1.4.0 ~> 1.4.1]).
176
-
177
63
  ## [3.2.1] - 2022-02-24
178
64
 
179
65
  ### Added
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright ©, 2022, Semrush Inc. (written by Roman Lysov, Sergey Kobets, Mikhail Karachev, Julia Mnizhek, Elena Krasnopolskaia, Mikhail Sereniti).
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
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_10jl7_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_10jl7_gg_._theme_info_10jl7_gg_{background-color:#e9f7ff;border-color:#8ecdff}.___SNotice_10jl7_gg_._theme_info_10jl7_gg_ .___SCloseIcon_10jl7_gg_{color:#008ff8}.___SNotice_10jl7_gg_._theme_info_10jl7_gg_ .___SCloseIcon_10jl7_gg_:hover{color:#006dca}.___SNotice_10jl7_gg_._theme_danger_10jl7_gg_{background-color:#fff0f7;border-color:#ffaeb5}.___SNotice_10jl7_gg_._theme_danger_10jl7_gg_ .___SCloseIcon_10jl7_gg_{color:#ff4953}.___SNotice_10jl7_gg_._theme_danger_10jl7_gg_ .___SCloseIcon_10jl7_gg_:hover{color:#d1002f}.___SNotice_10jl7_gg_._theme_warning_10jl7_gg_{background-color:#fff3d9;border-color:#ffb26e}.___SNotice_10jl7_gg_._theme_warning_10jl7_gg_ .___SCloseIcon_10jl7_gg_{color:#ff642d}.___SNotice_10jl7_gg_._theme_warning_10jl7_gg_ .___SCloseIcon_10jl7_gg_:hover{color:#c33909}.___SNotice_10jl7_gg_._theme_success_10jl7_gg_{background-color:#dbfee8;border-color:#59ddaa}.___SNotice_10jl7_gg_._theme_success_10jl7_gg_ .___SCloseIcon_10jl7_gg_{color:#009f81}.___SNotice_10jl7_gg_._theme_success_10jl7_gg_ .___SCloseIcon_10jl7_gg_:hover{color:#007c65}.___SContent_10jl7_gg_{flex:1 1 auto;width:100%}.___SActions_10jl7_gg_{flex-shrink:0;margin-top:12px}.___SLabel_10jl7_gg_{margin-top:2px;margin-right:8px;display:inline-flex}.___SLabel_10jl7_gg_._theme_info_10jl7_gg_{color:#8a8e9b}.___SLabel_10jl7_gg_._theme_danger_10jl7_gg_{color:#ff4953}.___SLabel_10jl7_gg_._theme_warning_10jl7_gg_{color:#ff642d}.___SLabel_10jl7_gg_._theme_success_10jl7_gg_{color:#009f81}.___SLabel_10jl7_gg_._theme_custom_10jl7_gg_{color:var(--color_10jl7)}.___SCloseIcon_10jl7_gg_{flex-shrink:0;margin-left:16px}.___SNotice_10jl7_gg_._theme_custom_10jl7_gg_{background-color:var(--backgroundColor_10jl7);border-color:var(--backgroundColor_10jl7)}"
57
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SNotice_10lgb_gg_ {\n display: flex;\n padding: 16px;\n font-size: 14px;\n line-height: 1.42;\n box-sizing: border-box;\n border-style: solid;\n border-width: 1px;\n border-radius: 6px;\n}\n\n.___SNotice_10lgb_gg_._theme_info_10lgb_gg_ {\n background-color: #e9f7ff;\n border-color: #8ecdff\n}\n\n.___SNotice_10lgb_gg_._theme_info_10lgb_gg_ .___SCloseIcon_10lgb_gg_ {\n color: #8a8e9b\n }\n\n.___SNotice_10lgb_gg_._theme_info_10lgb_gg_ .___SCloseIcon_10lgb_gg_:hover {\n color: #6c6e79;\n }\n\n.___SNotice_10lgb_gg_._theme_danger_10lgb_gg_ {\n background-color: #fff0f7;\n border-color: #ffaeb5\n}\n\n.___SNotice_10lgb_gg_._theme_danger_10lgb_gg_ .___SCloseIcon_10lgb_gg_ {\n color: #ff4953\n }\n\n.___SNotice_10lgb_gg_._theme_danger_10lgb_gg_ .___SCloseIcon_10lgb_gg_:hover {\n color: #d1002f;\n }\n\n.___SNotice_10lgb_gg_._theme_warning_10lgb_gg_ {\n background-color: #fff3d9;\n border-color: #ffb26e\n}\n\n.___SNotice_10lgb_gg_._theme_warning_10lgb_gg_ .___SCloseIcon_10lgb_gg_ {\n color: #ff642d\n }\n\n.___SNotice_10lgb_gg_._theme_warning_10lgb_gg_ .___SCloseIcon_10lgb_gg_:hover {\n color: #c33909;\n }\n\n.___SNotice_10lgb_gg_._theme_success_10lgb_gg_ {\n background-color: #dbfee8;\n border-color: #59ddaa\n}\n\n.___SNotice_10lgb_gg_._theme_success_10lgb_gg_ .___SCloseIcon_10lgb_gg_ {\n color: #009f81\n }\n\n.___SNotice_10lgb_gg_._theme_success_10lgb_gg_ .___SCloseIcon_10lgb_gg_:hover {\n color: #007c65;\n }\n\n.___SContent_10lgb_gg_ {\n flex: 1 1 auto;\n width: 100%;\n}\n\n.___SActions_10lgb_gg_ {\n flex-shrink: 0;\n margin-top: 12px;\n}\n\n.___SLabel_10lgb_gg_ {\n margin-top: 2px;\n margin-right: 8px;\n display: inline-flex;\n}\n\n.___SLabel_10lgb_gg_._theme_info_10lgb_gg_ {\n color: #8a8e9b;\n}\n\n.___SLabel_10lgb_gg_._theme_danger_10lgb_gg_ {\n color: #ff4953;\n}\n\n.___SLabel_10lgb_gg_._theme_warning_10lgb_gg_ {\n color: #ff642d;\n}\n\n.___SLabel_10lgb_gg_._theme_success_10lgb_gg_ {\n color: #009f81;\n}\n\n.___SLabel_10lgb_gg_._theme_custom_10lgb_gg_ {\n color: var(--color_10lgb);\n}\n\n.___SCloseIcon_10lgb_gg_ {\n flex-shrink: 0;\n margin-left: 16px;\n}\n\n.___SNotice_10lgb_gg_._theme_custom_10lgb_gg_ {\n background-color: var(--backgroundColor_10lgb);\n border-color: var(--backgroundColor_10lgb);\n}\n"
58
58
  /*__inner_css_end__*/
59
- , "10jl7_gg_")
59
+ , "10lgb_gg_")
60
60
  /*__reshadow_css_end__*/
61
61
  , {
62
- "__SNotice": "___SNotice_10jl7_gg_",
63
- "_theme_info": "_theme_info_10jl7_gg_",
64
- "__SCloseIcon": "___SCloseIcon_10jl7_gg_",
65
- "_theme_danger": "_theme_danger_10jl7_gg_",
66
- "_theme_warning": "_theme_warning_10jl7_gg_",
67
- "_theme_success": "_theme_success_10jl7_gg_",
68
- "__SContent": "___SContent_10jl7_gg_",
69
- "__SActions": "___SActions_10jl7_gg_",
70
- "__SLabel": "___SLabel_10jl7_gg_",
71
- "_theme_custom": "_theme_custom_10jl7_gg_",
72
- "--color": "--color_10jl7",
73
- "--backgroundColor": "--backgroundColor_10jl7"
62
+ "__SNotice": "___SNotice_10lgb_gg_",
63
+ "_theme_info": "_theme_info_10lgb_gg_",
64
+ "__SCloseIcon": "___SCloseIcon_10lgb_gg_",
65
+ "_theme_danger": "_theme_danger_10lgb_gg_",
66
+ "_theme_warning": "_theme_warning_10lgb_gg_",
67
+ "_theme_success": "_theme_success_10lgb_gg_",
68
+ "__SContent": "___SContent_10lgb_gg_",
69
+ "__SActions": "___SActions_10lgb_gg_",
70
+ "__SLabel": "___SLabel_10lgb_gg_",
71
+ "_theme_custom": "_theme_custom_10lgb_gg_",
72
+ "--color": "--color_10lgb",
73
+ "--backgroundColor": "--backgroundColor_10lgb"
74
74
  });
75
75
 
76
76
  function isCustomTheme(theme) {
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { Box, IBoxProps } from '@semcore/flex-box';\nimport { IIconProps } from '@semcore/icon';\n\nexport type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | string;\nexport type NoticeUse = 'primary' | 'secondary';\n\nexport interface INoticeProps extends IBoxProps {\n /** Property for managing visibility of Notice */\n hidden?: boolean;\n /** Notice type\n * @deprecated since version ^4.1.0\n */\n use?: NoticeUse;\n /**\n * Notice theme\n * @default info\n */\n theme?: NoticeTheme;\n /** Duration of animation, ms\n * @default 250\n */\n duration?: number;\n}\n\nexport interface INoticeLabelProps extends IBoxProps {\n theme?: NoticeTheme;\n}\n\nexport interface INoticeContext {\n getLabelProps: PropGetterFn;\n}\n\nexport interface INoticeSmartProps extends INoticeProps {\n /**\n * A custom element for additional information\n */\n label?: React.ReactNode;\n /**\n * Custom action element\n */\n actions?: React.ReactNode;\n /**\n * Adds a Close icon\n */\n closable?: boolean;\n /**\n * Callback on a click on the close button\n */\n onClose?: (event: React.SyntheticEvent) => void;\n}\n\ndeclare const Notice: (<T>(props: CProps<INoticeProps & T, INoticeContext>) => ReturnEl) & {\n Label: <T>(props: INoticeLabelProps & T) => ReturnEl;\n Actions: typeof Box;\n Content: typeof Box;\n CloseIcon: <T>(props: IIconProps & T) => ReturnEl;\n};\n\ndeclare const NoticeSmart: <T>(props: CProps<INoticeSmartProps & T>) => ReturnEl;\n\nexport { NoticeSmart };\nexport default Notice;\n"],"mappings":""}
@@ -16,10 +16,10 @@ SNotice[theme='info'] {
16
16
  border-color: var(--blue-200);
17
17
 
18
18
  & SCloseIcon {
19
- color: var(--blue-400);
19
+ color: var(--gray-400);
20
20
 
21
21
  &:hover {
22
- color: var(--blue-500);
22
+ color: var(--gray-500);
23
23
  }
24
24
  }
25
25
  }
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_10jl7_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_10jl7_gg_._theme_info_10jl7_gg_{background-color:#e9f7ff;border-color:#8ecdff}.___SNotice_10jl7_gg_._theme_info_10jl7_gg_ .___SCloseIcon_10jl7_gg_{color:#008ff8}.___SNotice_10jl7_gg_._theme_info_10jl7_gg_ .___SCloseIcon_10jl7_gg_:hover{color:#006dca}.___SNotice_10jl7_gg_._theme_danger_10jl7_gg_{background-color:#fff0f7;border-color:#ffaeb5}.___SNotice_10jl7_gg_._theme_danger_10jl7_gg_ .___SCloseIcon_10jl7_gg_{color:#ff4953}.___SNotice_10jl7_gg_._theme_danger_10jl7_gg_ .___SCloseIcon_10jl7_gg_:hover{color:#d1002f}.___SNotice_10jl7_gg_._theme_warning_10jl7_gg_{background-color:#fff3d9;border-color:#ffb26e}.___SNotice_10jl7_gg_._theme_warning_10jl7_gg_ .___SCloseIcon_10jl7_gg_{color:#ff642d}.___SNotice_10jl7_gg_._theme_warning_10jl7_gg_ .___SCloseIcon_10jl7_gg_:hover{color:#c33909}.___SNotice_10jl7_gg_._theme_success_10jl7_gg_{background-color:#dbfee8;border-color:#59ddaa}.___SNotice_10jl7_gg_._theme_success_10jl7_gg_ .___SCloseIcon_10jl7_gg_{color:#009f81}.___SNotice_10jl7_gg_._theme_success_10jl7_gg_ .___SCloseIcon_10jl7_gg_:hover{color:#007c65}.___SContent_10jl7_gg_{flex:1 1 auto;width:100%}.___SActions_10jl7_gg_{flex-shrink:0;margin-top:12px}.___SLabel_10jl7_gg_{margin-top:2px;margin-right:8px;display:inline-flex}.___SLabel_10jl7_gg_._theme_info_10jl7_gg_{color:#8a8e9b}.___SLabel_10jl7_gg_._theme_danger_10jl7_gg_{color:#ff4953}.___SLabel_10jl7_gg_._theme_warning_10jl7_gg_{color:#ff642d}.___SLabel_10jl7_gg_._theme_success_10jl7_gg_{color:#009f81}.___SLabel_10jl7_gg_._theme_custom_10jl7_gg_{color:var(--color_10jl7)}.___SCloseIcon_10jl7_gg_{flex-shrink:0;margin-left:16px}.___SNotice_10jl7_gg_._theme_custom_10jl7_gg_{background-color:var(--backgroundColor_10jl7);border-color:var(--backgroundColor_10jl7)}"
36
+ ":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SNotice_10lgb_gg_ {\n display: flex;\n padding: 16px;\n font-size: 14px;\n line-height: 1.42;\n box-sizing: border-box;\n border-style: solid;\n border-width: 1px;\n border-radius: 6px;\n}\n\n.___SNotice_10lgb_gg_._theme_info_10lgb_gg_ {\n background-color: #e9f7ff;\n border-color: #8ecdff\n}\n\n.___SNotice_10lgb_gg_._theme_info_10lgb_gg_ .___SCloseIcon_10lgb_gg_ {\n color: #8a8e9b\n }\n\n.___SNotice_10lgb_gg_._theme_info_10lgb_gg_ .___SCloseIcon_10lgb_gg_:hover {\n color: #6c6e79;\n }\n\n.___SNotice_10lgb_gg_._theme_danger_10lgb_gg_ {\n background-color: #fff0f7;\n border-color: #ffaeb5\n}\n\n.___SNotice_10lgb_gg_._theme_danger_10lgb_gg_ .___SCloseIcon_10lgb_gg_ {\n color: #ff4953\n }\n\n.___SNotice_10lgb_gg_._theme_danger_10lgb_gg_ .___SCloseIcon_10lgb_gg_:hover {\n color: #d1002f;\n }\n\n.___SNotice_10lgb_gg_._theme_warning_10lgb_gg_ {\n background-color: #fff3d9;\n border-color: #ffb26e\n}\n\n.___SNotice_10lgb_gg_._theme_warning_10lgb_gg_ .___SCloseIcon_10lgb_gg_ {\n color: #ff642d\n }\n\n.___SNotice_10lgb_gg_._theme_warning_10lgb_gg_ .___SCloseIcon_10lgb_gg_:hover {\n color: #c33909;\n }\n\n.___SNotice_10lgb_gg_._theme_success_10lgb_gg_ {\n background-color: #dbfee8;\n border-color: #59ddaa\n}\n\n.___SNotice_10lgb_gg_._theme_success_10lgb_gg_ .___SCloseIcon_10lgb_gg_ {\n color: #009f81\n }\n\n.___SNotice_10lgb_gg_._theme_success_10lgb_gg_ .___SCloseIcon_10lgb_gg_:hover {\n color: #007c65;\n }\n\n.___SContent_10lgb_gg_ {\n flex: 1 1 auto;\n width: 100%;\n}\n\n.___SActions_10lgb_gg_ {\n flex-shrink: 0;\n margin-top: 12px;\n}\n\n.___SLabel_10lgb_gg_ {\n margin-top: 2px;\n margin-right: 8px;\n display: inline-flex;\n}\n\n.___SLabel_10lgb_gg_._theme_info_10lgb_gg_ {\n color: #8a8e9b;\n}\n\n.___SLabel_10lgb_gg_._theme_danger_10lgb_gg_ {\n color: #ff4953;\n}\n\n.___SLabel_10lgb_gg_._theme_warning_10lgb_gg_ {\n color: #ff642d;\n}\n\n.___SLabel_10lgb_gg_._theme_success_10lgb_gg_ {\n color: #009f81;\n}\n\n.___SLabel_10lgb_gg_._theme_custom_10lgb_gg_ {\n color: var(--color_10lgb);\n}\n\n.___SCloseIcon_10lgb_gg_ {\n flex-shrink: 0;\n margin-left: 16px;\n}\n\n.___SNotice_10lgb_gg_._theme_custom_10lgb_gg_ {\n background-color: var(--backgroundColor_10lgb);\n border-color: var(--backgroundColor_10lgb);\n}\n"
37
37
  /*__inner_css_end__*/
38
- , "10jl7_gg_")
38
+ , "10lgb_gg_")
39
39
  /*__reshadow_css_end__*/
40
40
  , {
41
- "__SNotice": "___SNotice_10jl7_gg_",
42
- "_theme_info": "_theme_info_10jl7_gg_",
43
- "__SCloseIcon": "___SCloseIcon_10jl7_gg_",
44
- "_theme_danger": "_theme_danger_10jl7_gg_",
45
- "_theme_warning": "_theme_warning_10jl7_gg_",
46
- "_theme_success": "_theme_success_10jl7_gg_",
47
- "__SContent": "___SContent_10jl7_gg_",
48
- "__SActions": "___SActions_10jl7_gg_",
49
- "__SLabel": "___SLabel_10jl7_gg_",
50
- "_theme_custom": "_theme_custom_10jl7_gg_",
51
- "--color": "--color_10jl7",
52
- "--backgroundColor": "--backgroundColor_10jl7"
41
+ "__SNotice": "___SNotice_10lgb_gg_",
42
+ "_theme_info": "_theme_info_10lgb_gg_",
43
+ "__SCloseIcon": "___SCloseIcon_10lgb_gg_",
44
+ "_theme_danger": "_theme_danger_10lgb_gg_",
45
+ "_theme_warning": "_theme_warning_10lgb_gg_",
46
+ "_theme_success": "_theme_success_10lgb_gg_",
47
+ "__SContent": "___SContent_10lgb_gg_",
48
+ "__SActions": "___SActions_10lgb_gg_",
49
+ "__SLabel": "___SLabel_10lgb_gg_",
50
+ "_theme_custom": "_theme_custom_10lgb_gg_",
51
+ "--color": "--color_10lgb",
52
+ "--backgroundColor": "--backgroundColor_10lgb"
53
53
  });
54
54
 
55
55
  function isCustomTheme(theme) {
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { Box, IBoxProps } from '@semcore/flex-box';\nimport { IIconProps } from '@semcore/icon';\n\nexport type NoticeTheme = 'danger' | 'warning' | 'success' | 'info' | string;\nexport type NoticeUse = 'primary' | 'secondary';\n\nexport interface INoticeProps extends IBoxProps {\n /** Property for managing visibility of Notice */\n hidden?: boolean;\n /** Notice type\n * @deprecated since version ^4.1.0\n */\n use?: NoticeUse;\n /**\n * Notice theme\n * @default info\n */\n theme?: NoticeTheme;\n /** Duration of animation, ms\n * @default 250\n */\n duration?: number;\n}\n\nexport interface INoticeLabelProps extends IBoxProps {\n theme?: NoticeTheme;\n}\n\nexport interface INoticeContext {\n getLabelProps: PropGetterFn;\n}\n\nexport interface INoticeSmartProps extends INoticeProps {\n /**\n * A custom element for additional information\n */\n label?: React.ReactNode;\n /**\n * Custom action element\n */\n actions?: React.ReactNode;\n /**\n * Adds a Close icon\n */\n closable?: boolean;\n /**\n * Callback on a click on the close button\n */\n onClose?: (event: React.SyntheticEvent) => void;\n}\n\ndeclare const Notice: (<T>(props: CProps<INoticeProps & T, INoticeContext>) => ReturnEl) & {\n Label: <T>(props: INoticeLabelProps & T) => ReturnEl;\n Actions: typeof Box;\n Content: typeof Box;\n CloseIcon: <T>(props: IIconProps & T) => ReturnEl;\n};\n\ndeclare const NoticeSmart: <T>(props: CProps<INoticeSmartProps & T>) => ReturnEl;\n\nexport { NoticeSmart };\nexport default Notice;\n"],"mappings":""}
@@ -16,10 +16,10 @@ SNotice[theme='info'] {
16
16
  border-color: var(--blue-200);
17
17
 
18
18
  & SCloseIcon {
19
- color: var(--blue-400);
19
+ color: var(--gray-400);
20
20
 
21
21
  &:hover {
22
- color: var(--blue-500);
22
+ color: var(--gray-500);
23
23
  }
24
24
  }
25
25
  }
package/package.json CHANGED
@@ -1,17 +1,13 @@
1
1
  {
2
2
  "name": "@semcore/notice",
3
3
  "description": "Semrush Notice Component",
4
- "version": "4.1.17",
4
+ "version": "4.1.19",
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
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
- "scripts": {
12
- "build": "build --source=js",
13
- "test": "jest"
14
- },
15
11
  "dependencies": {
16
12
  "@semcore/animation": "^1",
17
13
  "@semcore/utils": "^3.15",
@@ -32,6 +28,11 @@
32
28
  "directory": "semcore/notice"
33
29
  },
34
30
  "devDependencies": {
31
+ "@types/react": "16.8 - 17",
35
32
  "@semcore/jest-preset-ui": "1.0.0"
33
+ },
34
+ "scripts": {
35
+ "build": "pnpm semcore-builder --source=js",
36
+ "test": "jest"
36
37
  }
37
- }
38
+ }
@@ -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;
@@ -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;