@semcore/notice 5.45.0 → 5.45.1-prerelease.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 +6 -0
- package/lib/cjs/Notice.js +16 -16
- package/lib/es6/Notice.js +16 -16
- package/lib/esm/Notice.mjs +53 -53
- package/package.json +9 -9
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
|
+
## [5.45.1] - 2025-03-17
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/animation` [2.41.0 ~> 2.41.1], `@semcore/utils` [4.48.0 ~> 4.48.1], `@semcore/button` [5.42.0 ~> 5.42.1], `@semcore/flex-box` [5.41.0 ~> 5.41.1], `@semcore/icon` [4.60.0 ~> 4.60.1], `@semcore/core` [2.39.0 ~> 2.39.1]).
|
|
10
|
+
|
|
5
11
|
## [5.45.0] - 2025-03-14
|
|
6
12
|
|
|
7
13
|
### Added
|
package/lib/cjs/Notice.js
CHANGED
|
@@ -28,22 +28,22 @@ var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i
|
|
|
28
28
|
var _useCssVariable = require("@semcore/utils/lib/useCssVariable");
|
|
29
29
|
var _typography = require("@semcore/typography");
|
|
30
30
|
/*__reshadow-styles__:"./style/notice.shadow.css"*/
|
|
31
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
32
|
-
"__SNotice": "
|
|
33
|
-
"__SContent": "
|
|
34
|
-
"__SActions": "
|
|
35
|
-
"__SLabel": "
|
|
36
|
-
"_theme_info": "
|
|
37
|
-
"_theme_danger": "
|
|
38
|
-
"_theme_warning": "
|
|
39
|
-
"_theme_success": "
|
|
40
|
-
"_theme_muted": "
|
|
41
|
-
"_theme_custom": "
|
|
42
|
-
"--color": "--
|
|
43
|
-
"__SCloseIcon": "
|
|
44
|
-
"--backgroundColor": "--
|
|
45
|
-
"__STitle": "
|
|
46
|
-
"__SText": "
|
|
31
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SNotice_1phmw_gg_{display:flex;padding:var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);box-sizing:border-box;border-style:solid;border-width:1px;border-radius:var(--intergalactic-surface-rounded, 6px);color:var(--intergalactic-text-primary, #191b23)}.___SNotice_1phmw_gg_._theme_info_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-info, #e9f7ff);border-color:var(--intergalactic-border-info, #8ecdff)}.___SNotice_1phmw_gg_._theme_info_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_info_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SNotice_1phmw_gg_._theme_danger_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7);border-color:var(--intergalactic-border-critical, #ffaeb5)}.___SNotice_1phmw_gg_._theme_danger_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_danger_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-critical-hover-active, #CC3A42)}}.___SNotice_1phmw_gg_._theme_warning_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-warning, #fff3d9);border-color:var(--intergalactic-border-warning, #ffb26e)}.___SNotice_1phmw_gg_._theme_warning_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_warning_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-warning-hover-active, #CC5024)}}.___SNotice_1phmw_gg_._theme_success_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-success, #dbfee8);border-color:var(--intergalactic-border-success, #59ddaa)}.___SNotice_1phmw_gg_._theme_success_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_success_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-success-hover-active, #037E68)}}.___SNotice_1phmw_gg_._theme_muted_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9);border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SLabel_1phmw_gg_._theme_info_1phmw_gg_,.___SNotice_1phmw_gg_._theme_muted_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_muted_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SContent_1phmw_gg_{flex:1 1 auto;width:100%}.___SActions_1phmw_gg_{flex-shrink:0;margin-top:var(--intergalactic-spacing-3x, 12px)}.___SLabel_1phmw_gg_{min-height:var(--intergalactic-form-control-m, 28px);height:-moz-fit-content;height:fit-content;margin-right:var(--intergalactic-spacing-2x, 8px);display:inline-flex;align-items:center}.___SLabel_1phmw_gg_._theme_danger_1phmw_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}.___SLabel_1phmw_gg_._theme_warning_1phmw_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}.___SLabel_1phmw_gg_._theme_success_1phmw_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}.___SLabel_1phmw_gg_._theme_muted_1phmw_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SLabel_1phmw_gg_._theme_custom_1phmw_gg_{color:var(--color_1phmw)}.___SCloseIcon_1phmw_gg_{flex-shrink:0;margin-left:var(--intergalactic-spacing-4x, 16px)}.___SNotice_1phmw_gg_._theme_custom_1phmw_gg_{background-color:var(--backgroundColor_1phmw);border-color:var(--backgroundColor_1phmw)}.___STitle_1phmw_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-bottom:var(--intergalactic-spacing-05x, 2px)}.___SText_1phmw_gg_{margin-top:var(--intergalactic-spacing-1x, 4px);margin-bottom:var(--intergalactic-spacing-1x, 4px)}" /*__inner_css_end__*/, "1phmw_gg_") /*__reshadow_css_end__*/, {
|
|
32
|
+
"__SNotice": "___SNotice_1phmw_gg_",
|
|
33
|
+
"__SContent": "___SContent_1phmw_gg_",
|
|
34
|
+
"__SActions": "___SActions_1phmw_gg_",
|
|
35
|
+
"__SLabel": "___SLabel_1phmw_gg_",
|
|
36
|
+
"_theme_info": "_theme_info_1phmw_gg_",
|
|
37
|
+
"_theme_danger": "_theme_danger_1phmw_gg_",
|
|
38
|
+
"_theme_warning": "_theme_warning_1phmw_gg_",
|
|
39
|
+
"_theme_success": "_theme_success_1phmw_gg_",
|
|
40
|
+
"_theme_muted": "_theme_muted_1phmw_gg_",
|
|
41
|
+
"_theme_custom": "_theme_custom_1phmw_gg_",
|
|
42
|
+
"--color": "--color_1phmw",
|
|
43
|
+
"__SCloseIcon": "___SCloseIcon_1phmw_gg_",
|
|
44
|
+
"--backgroundColor": "--backgroundColor_1phmw",
|
|
45
|
+
"__STitle": "___STitle_1phmw_gg_",
|
|
46
|
+
"__SText": "___SText_1phmw_gg_"
|
|
47
47
|
});
|
|
48
48
|
function isCustomTheme(theme) {
|
|
49
49
|
return !['danger', 'warning', 'success', 'info', 'muted'].includes(theme);
|
package/lib/es6/Notice.js
CHANGED
|
@@ -28,22 +28,22 @@ import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
|
28
28
|
import { cssVariableEnhance } from '@semcore/utils/lib/useCssVariable';
|
|
29
29
|
import { Text } from '@semcore/typography';
|
|
30
30
|
/*__reshadow-styles__:"./style/notice.shadow.css"*/
|
|
31
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
32
|
-
"__SNotice": "
|
|
33
|
-
"__SContent": "
|
|
34
|
-
"__SActions": "
|
|
35
|
-
"__SLabel": "
|
|
36
|
-
"_theme_info": "
|
|
37
|
-
"_theme_danger": "
|
|
38
|
-
"_theme_warning": "
|
|
39
|
-
"_theme_success": "
|
|
40
|
-
"_theme_muted": "
|
|
41
|
-
"_theme_custom": "
|
|
42
|
-
"--color": "--
|
|
43
|
-
"__SCloseIcon": "
|
|
44
|
-
"--backgroundColor": "--
|
|
45
|
-
"__STitle": "
|
|
46
|
-
"__SText": "
|
|
31
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SNotice_1phmw_gg_{display:flex;padding:var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);box-sizing:border-box;border-style:solid;border-width:1px;border-radius:var(--intergalactic-surface-rounded, 6px);color:var(--intergalactic-text-primary, #191b23)}.___SNotice_1phmw_gg_._theme_info_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-info, #e9f7ff);border-color:var(--intergalactic-border-info, #8ecdff)}.___SNotice_1phmw_gg_._theme_info_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_info_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SNotice_1phmw_gg_._theme_danger_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7);border-color:var(--intergalactic-border-critical, #ffaeb5)}.___SNotice_1phmw_gg_._theme_danger_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_danger_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-critical-hover-active, #CC3A42)}}.___SNotice_1phmw_gg_._theme_warning_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-warning, #fff3d9);border-color:var(--intergalactic-border-warning, #ffb26e)}.___SNotice_1phmw_gg_._theme_warning_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_warning_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-warning-hover-active, #CC5024)}}.___SNotice_1phmw_gg_._theme_success_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-success, #dbfee8);border-color:var(--intergalactic-border-success, #59ddaa)}.___SNotice_1phmw_gg_._theme_success_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_success_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-success-hover-active, #037E68)}}.___SNotice_1phmw_gg_._theme_muted_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9);border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SLabel_1phmw_gg_._theme_info_1phmw_gg_,.___SNotice_1phmw_gg_._theme_muted_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_muted_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SContent_1phmw_gg_{flex:1 1 auto;width:100%}.___SActions_1phmw_gg_{flex-shrink:0;margin-top:var(--intergalactic-spacing-3x, 12px)}.___SLabel_1phmw_gg_{min-height:var(--intergalactic-form-control-m, 28px);height:-moz-fit-content;height:fit-content;margin-right:var(--intergalactic-spacing-2x, 8px);display:inline-flex;align-items:center}.___SLabel_1phmw_gg_._theme_danger_1phmw_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}.___SLabel_1phmw_gg_._theme_warning_1phmw_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}.___SLabel_1phmw_gg_._theme_success_1phmw_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}.___SLabel_1phmw_gg_._theme_muted_1phmw_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SLabel_1phmw_gg_._theme_custom_1phmw_gg_{color:var(--color_1phmw)}.___SCloseIcon_1phmw_gg_{flex-shrink:0;margin-left:var(--intergalactic-spacing-4x, 16px)}.___SNotice_1phmw_gg_._theme_custom_1phmw_gg_{background-color:var(--backgroundColor_1phmw);border-color:var(--backgroundColor_1phmw)}.___STitle_1phmw_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-bottom:var(--intergalactic-spacing-05x, 2px)}.___SText_1phmw_gg_{margin-top:var(--intergalactic-spacing-1x, 4px);margin-bottom:var(--intergalactic-spacing-1x, 4px)}" /*__inner_css_end__*/, "1phmw_gg_") /*__reshadow_css_end__*/, {
|
|
32
|
+
"__SNotice": "___SNotice_1phmw_gg_",
|
|
33
|
+
"__SContent": "___SContent_1phmw_gg_",
|
|
34
|
+
"__SActions": "___SActions_1phmw_gg_",
|
|
35
|
+
"__SLabel": "___SLabel_1phmw_gg_",
|
|
36
|
+
"_theme_info": "_theme_info_1phmw_gg_",
|
|
37
|
+
"_theme_danger": "_theme_danger_1phmw_gg_",
|
|
38
|
+
"_theme_warning": "_theme_warning_1phmw_gg_",
|
|
39
|
+
"_theme_success": "_theme_success_1phmw_gg_",
|
|
40
|
+
"_theme_muted": "_theme_muted_1phmw_gg_",
|
|
41
|
+
"_theme_custom": "_theme_custom_1phmw_gg_",
|
|
42
|
+
"--color": "--color_1phmw",
|
|
43
|
+
"__SCloseIcon": "___SCloseIcon_1phmw_gg_",
|
|
44
|
+
"--backgroundColor": "--backgroundColor_1phmw",
|
|
45
|
+
"__STitle": "___STitle_1phmw_gg_",
|
|
46
|
+
"__SText": "___SText_1phmw_gg_"
|
|
47
47
|
});
|
|
48
48
|
function isCustomTheme(theme) {
|
|
49
49
|
return !['danger', 'warning', 'success', 'info', 'muted'].includes(theme);
|
package/lib/esm/Notice.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import g from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import E from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
3
|
import L from "@babel/runtime/helpers/esm/createClass";
|
|
4
4
|
import A from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
5
5
|
import z from "@babel/runtime/helpers/esm/inherits";
|
|
6
6
|
import D from "@babel/runtime/helpers/esm/createSuper";
|
|
7
|
-
import
|
|
7
|
+
import h from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
8
|
import { sstyled as M } from "@semcore/utils/lib/core/index";
|
|
9
|
-
import R, { sstyled as
|
|
9
|
+
import R, { sstyled as l, assignProps as m, Component as $ } from "@semcore/core";
|
|
10
10
|
import n from "react";
|
|
11
11
|
import { Box as u } from "@semcore/flex-box";
|
|
12
12
|
import B from "@semcore/button";
|
|
13
|
-
import
|
|
13
|
+
import w from "@semcore/icon/Close/m";
|
|
14
14
|
import G from "@semcore/utils/lib/enhances/resolveColorEnhance";
|
|
15
15
|
import { FadeInOut as O } from "@semcore/animation";
|
|
16
|
-
import
|
|
16
|
+
import d from "@semcore/utils/lib/logger";
|
|
17
17
|
import V from "@semcore/notice-global";
|
|
18
18
|
import { localizedMessages as b } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
19
19
|
import j from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
@@ -23,30 +23,30 @@ var F = (
|
|
|
23
23
|
/*__reshadow_css_start__*/
|
|
24
24
|
(M.insert(
|
|
25
25
|
/*__inner_css_start__*/
|
|
26
|
-
".
|
|
27
|
-
"
|
|
26
|
+
".___SNotice_1phmw_gg_{display:flex;padding:var(--intergalactic-spacing-4x, 16px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);box-sizing:border-box;border-style:solid;border-width:1px;border-radius:var(--intergalactic-surface-rounded, 6px);color:var(--intergalactic-text-primary, #191b23)}.___SNotice_1phmw_gg_._theme_info_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-info, #e9f7ff);border-color:var(--intergalactic-border-info, #8ecdff)}.___SNotice_1phmw_gg_._theme_info_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_info_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SNotice_1phmw_gg_._theme_danger_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-critical, #fff0f7);border-color:var(--intergalactic-border-critical, #ffaeb5)}.___SNotice_1phmw_gg_._theme_danger_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_danger_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-critical-hover-active, #CC3A42)}}.___SNotice_1phmw_gg_._theme_warning_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-warning, #fff3d9);border-color:var(--intergalactic-border-warning, #ffb26e)}.___SNotice_1phmw_gg_._theme_warning_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_warning_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-warning-hover-active, #CC5024)}}.___SNotice_1phmw_gg_._theme_success_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-success, #dbfee8);border-color:var(--intergalactic-border-success, #59ddaa)}.___SNotice_1phmw_gg_._theme_success_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_success_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-success-hover-active, #037E68)}}.___SNotice_1phmw_gg_._theme_muted_1phmw_gg_{background-color:var(--intergalactic-bg-secondary-neutral, #f4f5f9);border-color:var(--intergalactic-border-secondary, #e0e1e9)}.___SLabel_1phmw_gg_._theme_info_1phmw_gg_,.___SNotice_1phmw_gg_._theme_muted_1phmw_gg_ .___SCloseIcon_1phmw_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}@media (hover:hover){.___SNotice_1phmw_gg_._theme_muted_1phmw_gg_ .___SCloseIcon_1phmw_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SContent_1phmw_gg_{flex:1 1 auto;width:100%}.___SActions_1phmw_gg_{flex-shrink:0;margin-top:var(--intergalactic-spacing-3x, 12px)}.___SLabel_1phmw_gg_{min-height:var(--intergalactic-form-control-m, 28px);height:-moz-fit-content;height:fit-content;margin-right:var(--intergalactic-spacing-2x, 8px);display:inline-flex;align-items:center}.___SLabel_1phmw_gg_._theme_danger_1phmw_gg_{color:var(--intergalactic-icon-primary-critical, #ff4953)}.___SLabel_1phmw_gg_._theme_warning_1phmw_gg_{color:var(--intergalactic-icon-primary-warning, #ff642d)}.___SLabel_1phmw_gg_._theme_success_1phmw_gg_{color:var(--intergalactic-icon-primary-success, #009f81)}.___SLabel_1phmw_gg_._theme_muted_1phmw_gg_{color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SLabel_1phmw_gg_._theme_custom_1phmw_gg_{color:var(--color_1phmw)}.___SCloseIcon_1phmw_gg_{flex-shrink:0;margin-left:var(--intergalactic-spacing-4x, 16px)}.___SNotice_1phmw_gg_._theme_custom_1phmw_gg_{background-color:var(--backgroundColor_1phmw);border-color:var(--backgroundColor_1phmw)}.___STitle_1phmw_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-bottom:var(--intergalactic-spacing-05x, 2px)}.___SText_1phmw_gg_{margin-top:var(--intergalactic-spacing-1x, 4px);margin-bottom:var(--intergalactic-spacing-1x, 4px)}",
|
|
27
|
+
"1phmw_gg_"
|
|
28
28
|
), {
|
|
29
|
-
__SNotice: "
|
|
30
|
-
__SContent: "
|
|
31
|
-
__SActions: "
|
|
32
|
-
__SLabel: "
|
|
33
|
-
_theme_info: "
|
|
34
|
-
_theme_danger: "
|
|
35
|
-
_theme_warning: "
|
|
36
|
-
_theme_success: "
|
|
37
|
-
_theme_muted: "
|
|
38
|
-
_theme_custom: "
|
|
39
|
-
"--color": "--
|
|
40
|
-
__SCloseIcon: "
|
|
41
|
-
"--backgroundColor": "--
|
|
42
|
-
__STitle: "
|
|
43
|
-
__SText: "
|
|
29
|
+
__SNotice: "___SNotice_1phmw_gg_",
|
|
30
|
+
__SContent: "___SContent_1phmw_gg_",
|
|
31
|
+
__SActions: "___SActions_1phmw_gg_",
|
|
32
|
+
__SLabel: "___SLabel_1phmw_gg_",
|
|
33
|
+
_theme_info: "_theme_info_1phmw_gg_",
|
|
34
|
+
_theme_danger: "_theme_danger_1phmw_gg_",
|
|
35
|
+
_theme_warning: "_theme_warning_1phmw_gg_",
|
|
36
|
+
_theme_success: "_theme_success_1phmw_gg_",
|
|
37
|
+
_theme_muted: "_theme_muted_1phmw_gg_",
|
|
38
|
+
_theme_custom: "_theme_custom_1phmw_gg_",
|
|
39
|
+
"--color": "--color_1phmw",
|
|
40
|
+
__SCloseIcon: "___SCloseIcon_1phmw_gg_",
|
|
41
|
+
"--backgroundColor": "--backgroundColor_1phmw",
|
|
42
|
+
__STitle: "___STitle_1phmw_gg_",
|
|
43
|
+
__SText: "___SText_1phmw_gg_"
|
|
44
44
|
})
|
|
45
45
|
);
|
|
46
|
-
function
|
|
46
|
+
function y(_) {
|
|
47
47
|
return !["danger", "warning", "success", "info", "muted"].includes(_);
|
|
48
48
|
}
|
|
49
|
-
var
|
|
49
|
+
var p = /* @__PURE__ */ function(_) {
|
|
50
50
|
z(r, _);
|
|
51
51
|
var o = D(r);
|
|
52
52
|
function r() {
|
|
@@ -54,7 +54,7 @@ var y = /* @__PURE__ */ function(_) {
|
|
|
54
54
|
E(this, r);
|
|
55
55
|
for (var e = arguments.length, a = new Array(e), i = 0; i < e; i++)
|
|
56
56
|
a[i] = arguments[i];
|
|
57
|
-
return t = o.call.apply(o, [this].concat(a)),
|
|
57
|
+
return t = o.call.apply(o, [this].concat(a)), h(A(t), "ref", /* @__PURE__ */ n.createRef()), t;
|
|
58
58
|
}
|
|
59
59
|
return L(r, [{
|
|
60
60
|
key: "componentDidMount",
|
|
@@ -63,7 +63,7 @@ var y = /* @__PURE__ */ function(_) {
|
|
|
63
63
|
var e = function(i) {
|
|
64
64
|
return !!(i.hasAttribute("aria-label") || i.hasAttribute("aria-labelledby") || i.hasAttribute("title"));
|
|
65
65
|
};
|
|
66
|
-
|
|
66
|
+
d.warn(!e(this.ref.current), "Provide unique 'title' or 'aria-label' or 'aria-labelledby' to help identify the type and importance of notification", this.props["data-ui-name"] || r.displayName);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}, {
|
|
@@ -94,44 +94,44 @@ var y = /* @__PURE__ */ function(_) {
|
|
|
94
94
|
}, {
|
|
95
95
|
key: "render",
|
|
96
96
|
value: function() {
|
|
97
|
-
var e = this.asProps, a, i = O, c = this.asProps,
|
|
98
|
-
if (
|
|
99
|
-
return
|
|
100
|
-
var
|
|
101
|
-
return s === "muted" && (
|
|
102
|
-
visible: !
|
|
103
|
-
"use:theme":
|
|
104
|
-
backgroundColor:
|
|
97
|
+
var e = this.asProps, a, i = O, c = this.asProps, f = c.Children, C = c.styles, x = c.hidden, s = c.theme, N = c.use, I = c.resolveColor, T = c.getI18nText, P = I(s), k = y(s) ? "custom" : s;
|
|
98
|
+
if (N === "primary")
|
|
99
|
+
return d.warn(!0, 'Deprecated property-value pair "use=primary", use component <NoticeGlobal/> instead', r.displayName), /* @__PURE__ */ n.createElement(V, this.asProps);
|
|
100
|
+
var v = T(s === "danger" ? "criticalNotification" : "notification");
|
|
101
|
+
return s === "muted" && (v = void 0), a = l(C), /* @__PURE__ */ n.createElement(i, a.cn("SNotice", g({}, m({
|
|
102
|
+
visible: !x,
|
|
103
|
+
"use:theme": k,
|
|
104
|
+
backgroundColor: P,
|
|
105
105
|
role: "region",
|
|
106
|
-
"aria-label":
|
|
106
|
+
"aria-label": v,
|
|
107
107
|
ref: this.ref
|
|
108
|
-
}, e))), /* @__PURE__ */ n.createElement(
|
|
108
|
+
}, e))), /* @__PURE__ */ n.createElement(f, a.cn("Children", {})));
|
|
109
109
|
}
|
|
110
110
|
}]), r;
|
|
111
111
|
}($);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
h(p, "displayName", "Notice");
|
|
113
|
+
h(p, "style", F);
|
|
114
|
+
h(p, "enhance", [j(b), q({
|
|
115
115
|
variable: "--intergalactic-duration-popper",
|
|
116
116
|
fallback: "200",
|
|
117
117
|
map: Number.parseInt,
|
|
118
118
|
prop: "duration"
|
|
119
119
|
}), G()]);
|
|
120
|
-
|
|
120
|
+
h(p, "defaultProps", {
|
|
121
121
|
theme: "info",
|
|
122
122
|
i18n: b,
|
|
123
123
|
locale: "en"
|
|
124
124
|
});
|
|
125
125
|
function W(_) {
|
|
126
|
-
var o = arguments[0], r, t = _.styles, e = _.theme, a = _.resolveColor, i = u, c =
|
|
127
|
-
return r =
|
|
126
|
+
var o = arguments[0], r, t = _.styles, e = _.theme, a = _.resolveColor, i = u, c = y(e) ? "custom" : e, f = a(e);
|
|
127
|
+
return r = l(t), /* @__PURE__ */ n.createElement(i, r.cn("SLabel", g({}, m({
|
|
128
128
|
"use:theme": c,
|
|
129
|
-
color:
|
|
129
|
+
color: f
|
|
130
130
|
}, o))));
|
|
131
131
|
}
|
|
132
132
|
function H(_) {
|
|
133
133
|
var o = arguments[0], r, t = _.styles, e = S;
|
|
134
|
-
return r =
|
|
134
|
+
return r = l(t), /* @__PURE__ */ n.createElement(e, r.cn("STitle", g({}, m({
|
|
135
135
|
tag: "div",
|
|
136
136
|
size: 300,
|
|
137
137
|
fontWeight: "bold"
|
|
@@ -139,36 +139,36 @@ function H(_) {
|
|
|
139
139
|
}
|
|
140
140
|
function J(_) {
|
|
141
141
|
var o = arguments[0], r, t = _.styles, e = S;
|
|
142
|
-
return r =
|
|
142
|
+
return r = l(t), /* @__PURE__ */ n.createElement(e, r.cn("SText", g({}, m({
|
|
143
143
|
tag: "div"
|
|
144
144
|
}, o))));
|
|
145
145
|
}
|
|
146
146
|
function K(_) {
|
|
147
147
|
var o = arguments[0], r, t = _.styles, e = u;
|
|
148
|
-
return r =
|
|
148
|
+
return r = l(t), /* @__PURE__ */ n.createElement(e, r.cn("SActions", g({}, m({}, o))));
|
|
149
149
|
}
|
|
150
150
|
function Q(_) {
|
|
151
151
|
var o = arguments[0], r, t = _.styles, e = u;
|
|
152
|
-
return r =
|
|
152
|
+
return r = l(t), /* @__PURE__ */ n.createElement(e, r.cn("SContent", g({}, m({}, o))));
|
|
153
153
|
}
|
|
154
154
|
function U(_) {
|
|
155
155
|
var o = arguments[0], r, t = _.styles, e = _.getI18nText, a = u;
|
|
156
|
-
return r =
|
|
157
|
-
tag:
|
|
156
|
+
return r = l(t), /* @__PURE__ */ n.createElement(a, r.cn("SCloseIcon", g({}, m({
|
|
157
|
+
tag: w,
|
|
158
158
|
interactive: !0,
|
|
159
159
|
"aria-label": e("close")
|
|
160
160
|
}, o))));
|
|
161
161
|
}
|
|
162
162
|
function X(_) {
|
|
163
163
|
var o = arguments[0], r, t = _.styles, e = _.getI18nText, a = B;
|
|
164
|
-
return r =
|
|
165
|
-
addonLeft:
|
|
164
|
+
return r = l(t), /* @__PURE__ */ n.createElement(a, r.cn("SCloseIcon", g({}, m({
|
|
165
|
+
addonLeft: w,
|
|
166
166
|
use: "tertiary",
|
|
167
167
|
theme: "muted",
|
|
168
168
|
"aria-label": e("close")
|
|
169
169
|
}, o))));
|
|
170
170
|
}
|
|
171
|
-
var
|
|
171
|
+
var we = R(p, {
|
|
172
172
|
Label: W,
|
|
173
173
|
Title: H,
|
|
174
174
|
Text: J,
|
|
@@ -178,5 +178,5 @@ var de = R(y, {
|
|
|
178
178
|
Close: X
|
|
179
179
|
});
|
|
180
180
|
export {
|
|
181
|
-
|
|
181
|
+
we as default
|
|
182
182
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/notice",
|
|
3
3
|
"description": "Semrush Notice Component",
|
|
4
|
-
"version": "5.45.0",
|
|
4
|
+
"version": "5.45.1-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/animation": "2.41.0",
|
|
18
|
-
"@semcore/utils": "4.48.0",
|
|
19
|
-
"@semcore/button": "5.42.0",
|
|
20
|
-
"@semcore/flex-box": "5.41.0",
|
|
21
|
-
"@semcore/icon": "4.60.0",
|
|
22
|
-
"@semcore/notice-global": "2.60.0",
|
|
23
|
-
"@semcore/typography": "5.52.0"
|
|
17
|
+
"@semcore/animation": "2.41.1-prerelease.0",
|
|
18
|
+
"@semcore/utils": "4.48.1-prerelease.0",
|
|
19
|
+
"@semcore/button": "5.42.1-prerelease.0",
|
|
20
|
+
"@semcore/flex-box": "5.41.1-prerelease.0",
|
|
21
|
+
"@semcore/icon": "4.60.1-prerelease.0",
|
|
22
|
+
"@semcore/notice-global": "2.60.1-prerelease.0",
|
|
23
|
+
"@semcore/typography": "5.52.1-prerelease.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@semcore/core": "^2.
|
|
26
|
+
"@semcore/core": "^2.39.1-prerelease.0",
|
|
27
27
|
"react": "16.8 - 18",
|
|
28
28
|
"react-dom": "16.8 - 18"
|
|
29
29
|
},
|