@semcore/notice-bubble 5.0.0-beta.1 → 5.0.1
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 +9 -1
- package/lib/cjs/NoticeBubble.js +11 -11
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/NoticeBubble.js +11 -11
- package/lib/es6/index.d.js.map +1 -1
- package/lib/types/index.d.ts +7 -10
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [5.0.
|
|
5
|
+
## [5.0.1] - 2023-07-24
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Notice bubble manager methods strictness.
|
|
10
|
+
|
|
11
|
+
## [5.0.0] - 2023-07-17
|
|
6
12
|
|
|
7
13
|
### Break
|
|
8
14
|
|
|
9
15
|
- Strict, backward incompatible typings.
|
|
10
16
|
|
|
17
|
+
## [4.9.4] - 2023-06-30
|
|
18
|
+
|
|
11
19
|
## [4.9.3] - 2023-06-28
|
|
12
20
|
|
|
13
21
|
### Changed
|
package/lib/cjs/NoticeBubble.js
CHANGED
|
@@ -31,17 +31,17 @@ var _useCssVariable = require("@semcore/utils/lib/useCssVariable");
|
|
|
31
31
|
var _ThemeProvider = require("@semcore/utils/lib/ThemeProvider");
|
|
32
32
|
var _excluded = ["forwardRef", "styles", "onMouseEnter", "onMouseLeave", "getI18nText", "icon", "children", "action"];
|
|
33
33
|
/*__reshadow-styles__:"./style/notice-bubble.shadow.css"*/
|
|
34
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/"@keyframes
|
|
35
|
-
"__SBubble": "
|
|
36
|
-
"__SView": "
|
|
37
|
-
"_type_info": "
|
|
38
|
-
"_type_warning": "
|
|
39
|
-
"__SContent": "
|
|
40
|
-
"__SMessage": "
|
|
41
|
-
"__SDismiss": "
|
|
42
|
-
"__SNoticeBubble": "
|
|
43
|
-
"@enter": "
|
|
44
|
-
"@exit": "
|
|
34
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/"@keyframes enter_1bggm{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_1bggm{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_1bggm_gg_,.___SContent_1bggm_gg_,.___SView_1bggm_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_1bggm_gg_,.___SView_1bggm_gg_{position:relative;margin-bottom:var(--intergalactic-spacing-3x, 12px);padding:var(--intergalactic-spacing-3x, 12px) calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-1x, 4px)) var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-3x, 12px);width:100%;border-radius:var(--intergalactic-popper-rounded, 6px);overflow:hidden;box-sizing:border-box;color:var(--intergalactic-text-primary-invert, #ffffff)}.___SBubble_1bggm_gg_._type_info_1bggm_gg_,.___SView_1bggm_gg_._type_info_1bggm_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_1bggm_gg_._type_warning_1bggm_gg_,.___SView_1bggm_gg_._type_warning_1bggm_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_1bggm_gg_{flex-direction:column;flex:1}.___SMessage_1bggm_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_1bggm_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary-invert, #ffffff)}@media (hover:hover){.___SDismiss_1bggm_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_1bggm_gg_{width:300px;position:fixed;z-index:var(--intergalactic-z-index-notice-bubble, 999);right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_1bggm_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_1bggm_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "1bggm_gg_") /*__reshadow_css_end__*/, {
|
|
35
|
+
"__SBubble": "___SBubble_1bggm_gg_",
|
|
36
|
+
"__SView": "___SView_1bggm_gg_",
|
|
37
|
+
"_type_info": "_type_info_1bggm_gg_",
|
|
38
|
+
"_type_warning": "_type_warning_1bggm_gg_",
|
|
39
|
+
"__SContent": "___SContent_1bggm_gg_",
|
|
40
|
+
"__SMessage": "___SMessage_1bggm_gg_",
|
|
41
|
+
"__SDismiss": "___SDismiss_1bggm_gg_",
|
|
42
|
+
"__SNoticeBubble": "___SNoticeBubble_1bggm_gg_",
|
|
43
|
+
"@enter": "enter_1bggm",
|
|
44
|
+
"@exit": "exit_1bggm"
|
|
45
45
|
});
|
|
46
46
|
var Notices = function Notices(props) {
|
|
47
47
|
var styles = props.styles,
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":["NoticeBubbleManager","_createClass2","_classCallCheck2"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PortalProps } from '@semcore/portal';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManager;\n locale?: string;\n };\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children?: React.ReactNode;\n manager?: NoticeBubbleManager;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\ntype NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props:
|
|
1
|
+
{"version":3,"file":"index.d.js","names":["NoticeBubbleManager","_createClass2","_classCallCheck2"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PortalProps } from '@semcore/portal';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManager;\n locale?: string;\n };\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children?: React.ReactNode;\n manager?: NoticeBubbleManager;\n icon?: React.ReactElement;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\ntype NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => {\n uid: string;\n update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,\n ) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: string) => boolean;\n};\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;\ndeclare const NoticeBubbleContainer: Intergalactic.Component<'div', NoticeBubbleContainerProps> & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\ndeclare class NoticeBubbleManager implements NoticeBubbleManagerClass {\n /**\n * Creates and shows a notice.\n * */\n add(props: NoticeBubbleInfoProps | NoticeBubbleWarningProps): {\n uid: string;\n update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,\n ): boolean;\n /**\n * Removes notice by uid.\n * */\n remove(uid: string): boolean;\n}\n\ndeclare const noticeBubbleDefaultManager: NoticeBubbleManager;\n\nexport {\n NoticeBubbleContainer,\n NoticeBubble,\n NoticeBubbleWarning,\n NoticeBubbleManager,\n noticeBubbleDefaultManager,\n};\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default noticeBubbleDefaultManager;\n"],"mappings":";;;;;AAIA;AAWA;AAsBA;AAeA;AAeA;AAwBA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAecA,mBAAmB,oBAAAC,aAAA,sBAAAD,oBAAA;EAAA,IAAAE,gBAAA,mBAAAF,mBAAA;AAAA"}
|
package/lib/es6/NoticeBubble.js
CHANGED
|
@@ -25,17 +25,17 @@ import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
|
25
25
|
import { useCssVariable } from '@semcore/utils/lib/useCssVariable';
|
|
26
26
|
import { contextThemeEnhance } from '@semcore/utils/lib/ThemeProvider';
|
|
27
27
|
/*__reshadow-styles__:"./style/notice-bubble.shadow.css"*/
|
|
28
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes
|
|
29
|
-
"__SBubble": "
|
|
30
|
-
"__SView": "
|
|
31
|
-
"_type_info": "
|
|
32
|
-
"_type_warning": "
|
|
33
|
-
"__SContent": "
|
|
34
|
-
"__SMessage": "
|
|
35
|
-
"__SDismiss": "
|
|
36
|
-
"__SNoticeBubble": "
|
|
37
|
-
"@enter": "
|
|
38
|
-
"@exit": "
|
|
28
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes enter_1bggm{0%{transform:translate(100%,0);max-height:0;overflow:hidden}to{transform:translate(0,0);max-height:100vh;overflow:hidden}}@keyframes exit_1bggm{0%{max-height:100vh;overflow:hidden;opacity:1}to{max-height:0;overflow:hidden;opacity:0}}.___SBubble_1bggm_gg_,.___SContent_1bggm_gg_,.___SView_1bggm_gg_{grid-gap:var(--intergalactic-spacing-2x, 8px);gap:var(--intergalactic-spacing-2x, 8px)}.___SBubble_1bggm_gg_,.___SView_1bggm_gg_{position:relative;margin-bottom:var(--intergalactic-spacing-3x, 12px);padding:var(--intergalactic-spacing-3x, 12px) calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-1x, 4px)) var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-3x, 12px);width:100%;border-radius:var(--intergalactic-popper-rounded, 6px);overflow:hidden;box-sizing:border-box;color:var(--intergalactic-text-primary-invert, #ffffff)}.___SBubble_1bggm_gg_._type_info_1bggm_gg_,.___SView_1bggm_gg_._type_info_1bggm_gg_{background:var(--intergalactic-bg-primary-invert, #191b23)}.___SBubble_1bggm_gg_._type_warning_1bggm_gg_,.___SView_1bggm_gg_._type_warning_1bggm_gg_{background:var(--intergalactic-bg-primary-critical, #ff4953)}.___SContent_1bggm_gg_{flex-direction:column;flex:1}.___SMessage_1bggm_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-100, 133%)}.___SDismiss_1bggm_gg_{cursor:pointer;position:absolute;right:0;top:0;padding:var(--intergalactic-spacing-2x, 8px);color:var(--intergalactic-text-primary-invert, #ffffff)}@media (hover:hover){.___SDismiss_1bggm_gg_:hover{color:var(--intergalactic-control-primary-invert-active, #e0e1e9)}}.___SNoticeBubble_1bggm_gg_{width:300px;position:fixed;z-index:var(--intergalactic-z-index-notice-bubble, 999);right:var(--intergalactic-spacing-3x, 12px);top:var(--intergalactic-spacing-3x, 12px)}@media (max-width:767px){.___SNoticeBubble_1bggm_gg_{width:calc(100% - var(--intergalactic-spacing-6x, 24px))}}.___SMessage_1bggm_gg_ a{color:var(--intergalactic-text-link-invert, #8ecdff)}" /*__inner_css_end__*/, "1bggm_gg_") /*__reshadow_css_end__*/, {
|
|
29
|
+
"__SBubble": "___SBubble_1bggm_gg_",
|
|
30
|
+
"__SView": "___SView_1bggm_gg_",
|
|
31
|
+
"_type_info": "_type_info_1bggm_gg_",
|
|
32
|
+
"_type_warning": "_type_warning_1bggm_gg_",
|
|
33
|
+
"__SContent": "___SContent_1bggm_gg_",
|
|
34
|
+
"__SMessage": "___SMessage_1bggm_gg_",
|
|
35
|
+
"__SDismiss": "___SDismiss_1bggm_gg_",
|
|
36
|
+
"__SNoticeBubble": "___SNoticeBubble_1bggm_gg_",
|
|
37
|
+
"@enter": "enter_1bggm",
|
|
38
|
+
"@exit": "exit_1bggm"
|
|
39
39
|
});
|
|
40
40
|
var Notices = function Notices(props) {
|
|
41
41
|
var styles = props.styles,
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":["NoticeBubbleManager","_createClass","_classCallCheck"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PortalProps } from '@semcore/portal';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManager;\n locale?: string;\n };\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children?: React.ReactNode;\n manager?: NoticeBubbleManager;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\ntype NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props:
|
|
1
|
+
{"version":3,"file":"index.d.js","names":["NoticeBubbleManager","_createClass","_classCallCheck"],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PortalProps } from '@semcore/portal';\nimport { UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface INoticeBubbleContainerProps\n extends NoticeBubbleContainerProps,\n UnknownProperties {}\nexport type NoticeBubbleContainerProps = BoxProps &\n PortalProps & {\n /** Manager copy */\n manager?: NoticeBubbleManager;\n locale?: string;\n };\n\n/** @deprecated */\nexport interface INoticeBubbleProps extends NoticeBubbleProps, UnknownProperties {}\nexport type NoticeBubbleProps = BoxProps & {\n /**\n * Notice visibility.\n */\n visible?: boolean;\n /**\n * Control under the notice children.\n * */\n action?: React.ReactNode;\n /**\n * Callback triggered by \"Close\" icon click.\n * */\n onClose?: (e?: React.SyntheticEvent) => void;\n /**\n * Notice content.\n * */\n children?: React.ReactNode;\n manager?: NoticeBubbleManager;\n icon?: React.ReactElement;\n};\n/** @deprecated */\nexport interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}\nexport type NoticeBubbleInfoProps = NoticeBubbleProps & {\n readonly type?: 'info';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleWarningProps extends NoticeBubbleWarningProps, UnknownProperties {}\nexport type NoticeBubbleWarningProps = NoticeBubbleProps & {\n readonly type?: 'warning';\n /**\n * Notice display duration.\n */\n duration?: number;\n /**\n * Enables animation on first rendering.\n * @default false\n */\n initialAnimation?: boolean;\n};\n\n/** @deprecated */\nexport interface INoticeBubbleManager extends NoticeBubbleManagerClass, UnknownProperties {}\ntype NoticeBubbleManagerClass = {\n /**\n * Creates and shows a notice.\n * */\n add: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => {\n uid: string;\n update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update: (\n uid: string,\n props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,\n ) => boolean;\n /**\n * Removes notice by uid.\n * */\n remove: (uid: string) => boolean;\n};\n\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubble: Intergalactic.Component<'div', NoticeBubbleInfoProps>;\n/**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\ndeclare const NoticeBubbleWarning: Intergalactic.Component<'div', NoticeBubbleWarningProps>;\ndeclare const NoticeBubbleContainer: Intergalactic.Component<'div', NoticeBubbleContainerProps> & {\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Info: typeof NoticeBubble;\n\n /**\n * @deprecated use `NoticeBubbleManager` instead.\n * */\n Warning: typeof NoticeBubbleWarning;\n};\ndeclare class NoticeBubbleManager implements NoticeBubbleManagerClass {\n /**\n * Creates and shows a notice.\n * */\n add(props: NoticeBubbleInfoProps | NoticeBubbleWarningProps): {\n uid: string;\n update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;\n remove: () => boolean;\n };\n /**\n * Updates notice by uid.\n * */\n update(\n uid: string,\n props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,\n ): boolean;\n /**\n * Removes notice by uid.\n * */\n remove(uid: string): boolean;\n}\n\ndeclare const noticeBubbleDefaultManager: NoticeBubbleManager;\n\nexport {\n NoticeBubbleContainer,\n NoticeBubble,\n NoticeBubbleWarning,\n NoticeBubbleManager,\n noticeBubbleDefaultManager,\n};\n/**\n * @deprecated Use `import { noticeBubbleDefaultManager } from ...` instead\n */\nexport default noticeBubbleDefaultManager;\n"],"mappings":";;AAIA;AAWA;AAsBA;AAeA;AAeA;AAwBA;AACA;AACA;AAEA;AACA;AACA;AAFA,IAecA,mBAAmB,gBAAAC,YAAA,UAAAD,oBAAA;EAAAE,eAAA,OAAAF,mBAAA;AAAA;AAAA"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export type NoticeBubbleProps = BoxProps & {
|
|
|
33
33
|
* */
|
|
34
34
|
children?: React.ReactNode;
|
|
35
35
|
manager?: NoticeBubbleManager;
|
|
36
|
+
icon?: React.ReactElement;
|
|
36
37
|
};
|
|
37
38
|
/** @deprecated */
|
|
38
39
|
export interface INoticeBubbleInfoProps extends NoticeBubbleInfoProps, UnknownProperties {}
|
|
@@ -70,11 +71,9 @@ type NoticeBubbleManagerClass = {
|
|
|
70
71
|
/**
|
|
71
72
|
* Creates and shows a notice.
|
|
72
73
|
* */
|
|
73
|
-
add: (props:
|
|
74
|
+
add: (props: NoticeBubbleInfoProps | NoticeBubbleWarningProps) => {
|
|
74
75
|
uid: string;
|
|
75
|
-
update: (
|
|
76
|
-
props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,
|
|
77
|
-
) => boolean;
|
|
76
|
+
update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;
|
|
78
77
|
remove: () => boolean;
|
|
79
78
|
};
|
|
80
79
|
/**
|
|
@@ -82,7 +81,7 @@ type NoticeBubbleManagerClass = {
|
|
|
82
81
|
* */
|
|
83
82
|
update: (
|
|
84
83
|
uid: string,
|
|
85
|
-
props: Partial<
|
|
84
|
+
props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,
|
|
86
85
|
) => boolean;
|
|
87
86
|
/**
|
|
88
87
|
* Removes notice by uid.
|
|
@@ -113,11 +112,9 @@ declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
|
|
|
113
112
|
/**
|
|
114
113
|
* Creates and shows a notice.
|
|
115
114
|
* */
|
|
116
|
-
add(props:
|
|
115
|
+
add(props: NoticeBubbleInfoProps | NoticeBubbleWarningProps): {
|
|
117
116
|
uid: string;
|
|
118
|
-
update: (
|
|
119
|
-
props: Partial<INoticeBubbleInfoProps> | Partial<INoticeBubbleWarningProps>,
|
|
120
|
-
) => boolean;
|
|
117
|
+
update: (props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>) => boolean;
|
|
121
118
|
remove: () => boolean;
|
|
122
119
|
};
|
|
123
120
|
/**
|
|
@@ -125,7 +122,7 @@ declare class NoticeBubbleManager implements NoticeBubbleManagerClass {
|
|
|
125
122
|
* */
|
|
126
123
|
update(
|
|
127
124
|
uid: string,
|
|
128
|
-
props: Partial<
|
|
125
|
+
props: Partial<NoticeBubbleInfoProps> | Partial<NoticeBubbleWarningProps>,
|
|
129
126
|
): boolean;
|
|
130
127
|
/**
|
|
131
128
|
* Removes notice by uid.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/notice-bubble",
|
|
3
3
|
"description": "Semrush NoticeBubble Component",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.1",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/utils": "4.0.0
|
|
13
|
-
"@semcore/icon": "4.0.0
|
|
14
|
-
"@semcore/portal": "3.0.0
|
|
15
|
-
"@semcore/flex-box": "5.0.0
|
|
16
|
-
"@semcore/animation": "2.0.0
|
|
12
|
+
"@semcore/utils": "4.0.0",
|
|
13
|
+
"@semcore/icon": "4.0.0",
|
|
14
|
+
"@semcore/portal": "3.0.0",
|
|
15
|
+
"@semcore/flex-box": "5.0.0",
|
|
16
|
+
"@semcore/animation": "2.0.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@semcore/core": "2.0.0
|
|
19
|
+
"@semcore/core": "2.0.0",
|
|
20
20
|
"react": "16.8 - 18",
|
|
21
21
|
"react-dom": "16.8 - 18"
|
|
22
22
|
},
|