@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 +6 -120
- package/LICENSE +21 -0
- package/lib/cjs/Notice.js +14 -14
- package/lib/cjs/index.d.js +2 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/cjs/style/notice.shadow.css +2 -2
- package/lib/es6/Notice.js +14 -14
- package/lib/es6/index.d.js +2 -0
- package/lib/es6/index.d.js.map +1 -0
- package/lib/es6/style/notice.shadow.css +2 -2
- package/package.json +7 -6
- package/lib/cjs/index.d.ts +0 -63
- package/lib/es6/index.d.ts +0 -63
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.
|
|
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.
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.32.2 ~> 2.33.0]).
|
|
22
10
|
|
|
23
|
-
## [4.
|
|
11
|
+
## [4.2.0] - unreleased
|
|
24
12
|
|
|
25
13
|
### Changed
|
|
26
14
|
|
|
27
|
-
-
|
|
15
|
+
- Color for Close icon with theme `info` was changed from `--blue-400` to `--gray-400`.
|
|
28
16
|
|
|
29
|
-
## [4.1.
|
|
17
|
+
## [4.1.17] - 2022-09-29
|
|
30
18
|
|
|
31
19
|
### Changed
|
|
32
20
|
|
|
33
|
-
- Version patch update due to children dependencies update (`@semcore/
|
|
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
|
-
".
|
|
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
|
-
, "
|
|
59
|
+
, "10lgb_gg_")
|
|
60
60
|
/*__reshadow_css_end__*/
|
|
61
61
|
, {
|
|
62
|
-
"__SNotice": "
|
|
63
|
-
"_theme_info": "
|
|
64
|
-
"__SCloseIcon": "
|
|
65
|
-
"_theme_danger": "
|
|
66
|
-
"_theme_warning": "
|
|
67
|
-
"_theme_success": "
|
|
68
|
-
"__SContent": "
|
|
69
|
-
"__SActions": "
|
|
70
|
-
"__SLabel": "
|
|
71
|
-
"_theme_custom": "
|
|
72
|
-
"--color": "--
|
|
73
|
-
"--backgroundColor": "--
|
|
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 @@
|
|
|
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":""}
|
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
|
-
".
|
|
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
|
-
, "
|
|
38
|
+
, "10lgb_gg_")
|
|
39
39
|
/*__reshadow_css_end__*/
|
|
40
40
|
, {
|
|
41
|
-
"__SNotice": "
|
|
42
|
-
"_theme_info": "
|
|
43
|
-
"__SCloseIcon": "
|
|
44
|
-
"_theme_danger": "
|
|
45
|
-
"_theme_warning": "
|
|
46
|
-
"_theme_success": "
|
|
47
|
-
"__SContent": "
|
|
48
|
-
"__SActions": "
|
|
49
|
-
"__SLabel": "
|
|
50
|
-
"_theme_custom": "
|
|
51
|
-
"--color": "--
|
|
52
|
-
"--backgroundColor": "--
|
|
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 @@
|
|
|
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":""}
|
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.
|
|
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
|
+
}
|
package/lib/cjs/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/lib/es6/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;
|